home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / tbav503.zip / TBSCAN.DOC < prev    next >
Text File  |  1992-12-29  |  117KB  |  2,821 lines

  1.  
  2.  
  3.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  4.  
  5.  
  6.                                Table of Contents
  7.  
  8.  
  9.     1. INTRODUCTION...................................... 2
  10.         1.1. Purpose of TbScan........................... 2
  11.         1.2. A Quick start............................... 2
  12.         1.3. Historical overview......................... 2
  13.         1.4. Benefits.................................... 3
  14.             1.4.1. Speed................................. 3
  15.             1.4.2. Reliability........................... 4
  16.             1.4.3. Flexibility........................... 5
  17.             1.4.4. Smart scanning........................ 6
  18.         1.5. Limitations of scanners..................... 7
  19.  
  20.     2. USAGE OF THE PROGRAM.............................. 8
  21.         2.1. System requirements......................... 8
  22.         2.2. Program invocation.......................... 8
  23.         2.3. While scanning.............................. 9
  24.         2.4. Detecting viruses........................... 9
  25.         2.5. Integrity checking......................... 10
  26.         2.6. Heuristic scanning......................... 11
  27.             2.6.1. False positives...................... 13
  28.             2.6.2. C - File has been changed............ 14
  29.             2.6.3. c - No integrity check............... 14
  30.             2.6.4. F - Suspicious file access........... 14
  31.             2.6.5. R - Suspicious relocator............. 14
  32.             2.6.6. A - Suspicious Memory Allocation..... 14
  33.             2.6.7. N - Wrong name extension............. 14
  34.             2.6.8. S - Search for executables........... 15
  35.             2.6.9. ..................................... 15
  36.             2.6.10. V - Validated program............... 15
  37.             2.6.11. E - Flexible Entry-point............ 15
  38.             2.6.12. L - program Load trap............... 16
  39.             2.6.13. D - Direct disk access.............. 16
  40.             2.6.14. M - Memory resident code............ 16
  41.             2.6.15. .................................... 16
  42.             2.6.16. T - Invalid timestamp............... 17
  43.             2.6.17. J - Suspicious jump construct....... 17
  44.             2.6.18. ? - Inconsistent header............. 17
  45.             2.6.19. G - Garbage instructions............ 17
  46.             2.6.20. U - Undocumented system call........ 17
  47.             2.6.21. Y - Invalid bootsector.............. 18
  48.             2.6.22. Z - EXE/COM determinator............ 18
  49.             2.6.23. O - code Overwrite.................. 18
  50.             2.6.24. B - Back to entry................... 18
  51.             2.6.25. K - Unusual stack................... 18
  52.             2.6.26. p - Packed or compressed file....... 18
  53.             2.6.27. w - Windows or OS/2 header.......... 19
  54.             2.6.28. h - Hidden or System file........... 19
  55.             2.6.29. i - Internal overlay................ 19
  56.         2.7. Program validation......................... 19
  57.         2.8. Command line options....................... 20
  58.  
  59.  
  60.  
  61.                                      Page i
  62.  
  63.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  64.  
  65.  
  66.             2.8.1. help ................................ 21
  67.             2.8.2. pause ............................... 21
  68.             2.8.3. mono ................................ 21
  69.             2.8.4. quick ............................... 21
  70.             2.8.5. allfiles ............................ 21
  71.             2.8.6. mutant .............................. 22
  72.             2.8.7. heuristic ........................... 22
  73.             2.8.8. direct .............................. 22
  74.             2.8.9. extract ............................. 23
  75.             2.8.10. valid .............................. 23
  76.             2.8.11. once ............................... 23
  77.             2.8.12. secure ............................. 24
  78.             2.8.13. compat ............................. 24
  79.             2.8.14. ignofile ........................... 24
  80.             2.8.15. noboot ............................. 24
  81.             2.8.16. sector ............................. 24
  82.             2.8.17. nomem .............................. 24
  83.             2.8.18. hma ................................ 24
  84.             2.8.19. nohmem ............................. 25
  85.             2.8.20. nosub .............................. 25
  86.             2.8.21. noavr .............................. 25
  87.             2.8.22. delete ............................. 25
  88.             2.8.23. rename ............................. 25
  89.             2.8.24. move ............................... 25
  90.             2.8.25. path ............................... 26
  91.             2.8.26. batch .............................. 26
  92.             2.8.27. repeat ............................. 26
  93.             2.8.28. log ................................ 26
  94.             2.8.29. session ............................ 27
  95.             2.8.30. loglevel ........................... 27
  96.             2.8.31. expertlog .......................... 27
  97.             2.8.32. sigfile ............................ 27
  98.         2.9. Examples:.................................. 28
  99.         2.10. The configuration file.................... 28
  100.         2.11. The TbScan.Msg file....................... 29
  101.         2.12. Residence of the signature files.......... 30
  102.         2.13. Residence of the AVR-modules.............. 30
  103.         2.14. Error messages............................ 30
  104.         2.15. Exit codes................................ 31
  105.  
  106.     3. FORMAT OF THE DATA FILE.......................... 32
  107.         3.1. Format of a signature entry................ 32
  108.         3.2. Wildcards.................................. 32
  109.         3.3. Limitations................................ 33
  110.         3.4. Defining new signatures.................... 34
  111.  
  112.     4. CONSIDERATIONS AND RECOMMENDATIONS............... 36
  113.         4.1. What should be scanned?.................... 36
  114.         4.2. The internals of TbScan.................... 37
  115.             4.2.1. How is that blazing speed achieved?.. 37
  116.             4.2.2. The code interpreter................. 38
  117.             4.2.3. The algorithms....................... 39
  118.  
  119.  
  120.  
  121.                                     Page ii
  122.  
  123.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  124.  
  125.  
  126.                 4.2.3.1. Looking........................ 39
  127.                 4.2.3.2. Checking....................... 39
  128.                 4.2.3.3. Tracing........................ 40
  129.                 4.2.3.4. Scanning....................... 40
  130.                 4.2.3.5. Browsing....................... 40
  131.                 4.2.3.6. Skipping....................... 40
  132.             4.2.4. Option 'compat'...................... 41
  133.         4.3. The Sanity check........................... 41
  134.         4.4. How many viruses does it detect?........... 42
  135.         4.5. Testing the scanner........................ 42
  136.         4.6. Scan scheduling............................ 42
  137.         4.7. Extensions to the format of the data file.. 43
  138.         4.8. Compressed files........................... 43
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.                                     Page iii
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.                                      Page 1
  242.  
  243.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  244.  
  245.  
  246. 1.  INTRODUCTION
  247.  
  248.  
  249.   1.1.  Purpose of TbScan
  250.  
  251.     TbScan is a virus scanner: it has been specifically developed to
  252.     detect viruses, Trojan Horses and other such threats to your
  253.     valuable data.
  254.  
  255.     A virus scanner is a program that is able to detect given virus
  256.     signatures in given environments. Most viruses consist of a unique
  257.     sequence of instructions, called a signature. Hence through
  258.     checking for the appearance of such signatures in a file we can
  259.     find out whether or not a program has been infected.
  260.  
  261.     Scanning all your program files for the signatures of all known
  262.     viruses helps you to find out quickly whether or not your system
  263.     has been infected and, if so, by what virus.
  264.  
  265.     Every PC owner should use a virus scanner frequently. It is the
  266.     least he or she should do to avoid damage caused by a virus.
  267.  
  268.  
  269.   1.2.  A Quick start
  270.  
  271.     Although we highly recommend a complete reading of this manual, we
  272.     offer you some directions for a quick run of TbScan here:
  273.  
  274.     Type 'TbScan C:\' at the DOS prompt. This will be sufficient for a
  275.     standard scan session. It is allowed to specify more drives:
  276.     'TbScan C:\ D:\'.
  277.  
  278.     The invocation syntax is:
  279.  
  280.             TBSCAN [@][<path>][<filename>]... [<options>]...
  281.  
  282.     If your system does not allow TbScan to run properly, set the
  283.     'compat' option: TBSCAN C:\ compat
  284.  
  285.     For fast online help type 'TbScan ?' or 'TbScan help'. The latter
  286.     will provide for a more detailed description of the command line
  287.     options.
  288.  
  289.  
  290.   1.3.  Historical overview
  291.  
  292.     Some years ago the PC community was confronted by a new phenomenon:
  293.     Computer viruses. In the early days of computer viruses one had to
  294.     examine each file separately for a single viral code pattern. It
  295.     didn't take long before programmers created small programs that
  296.     were able to tell whether or not a specified program had been
  297.     infected.
  298.  
  299.  
  300.  
  301.                                      Page 2
  302.  
  303.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  304.  
  305.  
  306.     Enhanced versions of these programs were able to search all files
  307.     automatically, still checking for a single viral code. In a short
  308.     period of time many such scanners were written, each capable of
  309.     detecting a specified virus signature.
  310.  
  311.     As the number of viruses kept on increasing, programmers started to
  312.     combine several scan programs into one: the multi-string scanner
  313.     was born. These early scanners worked properly, but could not last.
  314.     As the amount of viruses was rapidly growing, a scanner was
  315.     outdated soon.  Simultaneously the number of multi-string scanning
  316.     programs also increased, and scanning programs began detecting each
  317.     other's internal search patterns (signatures), wrongly informing
  318.     the user of a virus infection. Naturally a lot of people got
  319.     confused by these false alarms.
  320.  
  321.     A solution to these problems was to separate the search engine from
  322.     the signatures it would search for. The separate signature data
  323.     files that were the result could be updated and distributed much
  324.     faster through text media. Secondly, by separating the search
  325.     patterns from the executable file, a scanner would no longer
  326.     trigger false alarms.
  327.  
  328.     TbScan uses the signature file VIRSCAN.DAT, originally created for
  329.     a program called VIRSCAN.EXE. When VIRSCAN.EXE was developed, the
  330.     number of viruses was relatively small. However, when the number of
  331.     viruses increased, the Virscan program slowed down considerably as
  332.     a result of signature additions.
  333.  
  334.     At that time we developed the Thunderbyte add-on card, a universal
  335.     anti-virus device. Since the Thunderbyte card recognizes virus
  336.     activities rather than signatures, it will establish whether or not
  337.     a system has been infected, but it will not identify the virus
  338.     itself. To provide for such identification we decided to supply a
  339.     virus scanner along with our anti-virus hardware product, and we
  340.     developed TbScan.
  341.  
  342.     We introduced many very sophisticated ideas in the first version of
  343.     TbScan, such as: the use of wildcards in the signature, scanning
  344.     the memory of your PC, scanning only specific parts of a file
  345.     rather than the complete file, etc. Today, many competitive
  346.     products have adopted some of these new ideas.
  347.  
  348.  
  349.   1.4.  Benefits
  350.  
  351.     By now many different virus scanners have been developed.  However,
  352.     TbScan has a number of important and unique advantages over other
  353.     scanners. These are:
  354.  
  355.     1.4.1.  Speed
  356.  
  357.         Most virus scanners do not operate very fast, which means that
  358.  
  359.  
  360.  
  361.                                      Page 3
  362.  
  363.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  364.  
  365.  
  366.         scanning your PC for viruses can be a tedious, time-consuming
  367.         affair. Not many people will enjoy staring at their display for
  368.         a quarter of an hour or more while their system is being
  369.         scanned.  Consequently many people do not run their virus
  370.         scanners as often as they should. Under those circumstances
  371.         even the best virus scanner will become obsolete, simply
  372.         because it is not being used properly.
  373.  
  374.         Hence it was our goal to create a scanner fast enough to invite
  375.         users to invoke it from within their AUTOEXEC.BAT file every
  376.         morning.
  377.  
  378.         The speed depends on many system characteristics, so we will
  379.         not tell you how many times faster TbScan performs, but you
  380.         will easily find out yourself. The speed of our program has
  381.         been increased with almost every new release, and the current
  382.         version is faster than any other scanner known to us. Try it
  383.         yourself!
  384.  
  385.         TbScan is designed to scan for a large amount of virus
  386.         signatures. The current version of TbScan is able to scan for
  387.         over 2500 signatures (without additional memory requirements).
  388.         Because of its design, TbScan will not slow down if the number
  389.         of signatures increases. It doesn't matter whether you scan an
  390.         item for 10 or 1000 signatures.
  391.  
  392.         TbScan has a special mode to check a stack of diskettes at a
  393.         high speed.  You don't have to signal TbScan through keyboard
  394.         input that a diskette has been changed: The program determines
  395.         this completely automatically.
  396.  
  397.     1.4.2.  Reliability
  398.  
  399.         TbScan checks itself on invocation. If it detects that it has
  400.         been infected it aborts with an error. This minimizes the risk
  401.         that the TbScan program itself will transfer a virus and so
  402.         infect your system.
  403.  
  404.         TbScan can bypass viruses that are already active in memory.
  405.         This is possible through a built-in interrupt debugger!
  406.  
  407.         TbScan can also detect yet unknown viruses, because the
  408.         built-in disassembler is able to detect suspicious instruction
  409.         sequences and abnormal program lay-outs. This feature is
  410.         called 'heuristic scanning' and it is partially enabled by
  411.         default. Heuristic scanning is performed on files and
  412.         bootsectors, so for both items TbScan is able to find new and
  413.         yet unknown viruses.
  414.  
  415.         A lot of viruses are memory resident, which means that they
  416.         lodge themselves in the memory of your computer. There they can
  417.         comfortably affect all active programs. There are even 'smart'
  418.  
  419.  
  420.  
  421.                                      Page 4
  422.  
  423.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  424.  
  425.  
  426.         viruses that temporarily 'disinfect' a program file, as soon as
  427.         they notice that attempts are made to read the program file as
  428.         is the case during a scanning operation. Most virus scanners
  429.         will then find that this program file has not been infected
  430.         (which is true at the time of scanning !). But after the
  431.         scanner has completed its scan the virus becomes operant, again
  432.         ridiculing the scanner report that no virus has been found.
  433.  
  434.         TbScan offers a unique solution to this problem: it contains an
  435.         automatic debugger that works its way through the chain of
  436.         interrupts 'single stepping' until it reaches the DOS program
  437.         code. It saves the address which is then found and uses it for
  438.         communication with DOS.  In this way most viruses will not
  439.         notice the operation of TbScan.
  440.  
  441.         TbScan is able to scan Upper Memory, Video Memory and the HMA.
  442.         Many of the other scanners (still) don't recognize this memory.
  443.  
  444.         TbScan scans the video memory of your PC. Most anti-virus
  445.         products are not aware of the fact that it is possible to
  446.         install TSR programs (including viruses) in unused parts of
  447.         your video memory. TbScan scans all memory, including the video
  448.         memory, just to make sure.
  449.  
  450.         TbScan is able to search a complete disk at sector level.  This
  451.         procedure will not allow any virus to remain undetected. Even
  452.         viruses that have already been eliminated can be detected this
  453.         way.
  454.  
  455.         TbScan is able to detect mutants of a virus. A mutant is a
  456.         virus that has been modified slightly and therefore does not
  457.         match the original signature anymore. TbScan is able to detect
  458.         such a mutant, even if no wildcards are used in the virus
  459.         signature.
  460.  
  461.         TbScan is able to detect droppers of bootsector viruses. The
  462.         dropper program itself has not been infected, but it is there
  463.         to install the bootsector virus in your system.
  464.  
  465.         TbScan also checks for file changes if you have used TbSetup to
  466.         generate the Anti-Vir.Dat files. When a virus infects a file,
  467.         the file changes and therefore the checksum does not match
  468.         anymore. TbScan informs you about such an unexpected file
  469.         change.
  470.  
  471.     1.4.3.  Flexibility
  472.  
  473.         TbScan offers the flexibility of a data file that can be edited
  474.         quickly.
  475.  
  476.         As new viruses spread quickly there is often no time available
  477.         to continually adapt your own virus checker in order to make it
  478.  
  479.  
  480.  
  481.                                      Page 5
  482.  
  483.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  484.  
  485.  
  486.         capable of recognizing each new virus as it appears. That is
  487.         why TbScan uses a separate data file listing the signatures of
  488.         all known viruses. This file can be adapted quickly, possibly
  489.         by yourself. TbScan supports, among others, the format which is
  490.         used in the file VIRSCAN.DAT.  This file is regularly updated
  491.         and can be obtained through a lot of data banks.
  492.  
  493.         TbScan supports wildcards in the signature. Many viruses are
  494.         adapted and converted versions of existing viruses. Such a
  495.         modified virus - a mutant - is similar to the original virus,
  496.         but that part of the virus program which contains the signature
  497.         has often been changed. Most scanners will fail to recognize
  498.         the mutant unless the new signature has been incorporated into
  499.         the scanning program. TbScan has been designed to approach this
  500.         problem differently: by replacing the modified parts of the
  501.         signature by wildcards TbScan can still recognize mutant virus
  502.         activities. Hence all mutant versions of, for instance, the
  503.         Jerusalem/PLO virus can be discovered by TbScan through just
  504.         one signature instead of the, say, 25 that several other virus
  505.         scanners require. This also explains why TbScan uses 'only' 500
  506.         signatures but still detects all 1200 viruses known.
  507.  
  508.         There are viruses that are so completely encrypted that it is
  509.         no longer possible to define any signature for them, even when
  510.         using wildcards. The Dark Avenger Mutation Engine viruses are
  511.         such viruses. The only way to detect these viruses is by making
  512.         use of algorithmic routines. TbScan is the first scanner that
  513.         implemented the use of AVR (Algorithmic Virus Recognition)
  514.         modules, which contain the routines to detect such viruses. An
  515.         AVR-module is extremely flexible, it can perform almost any
  516.         operation necessary to detect an encrypted virus.
  517.  
  518.         TbScan offers registered users the possibility to define their
  519.         own signatures through the 'extract' option. You don't have to
  520.         be an assembler programmer anymore, if a signature has to be
  521.         defined in an emergency situation!
  522.  
  523.     1.4.4.  Smart scanning
  524.  
  525.         TbScan is not just a scanner, it is a disassembling scanner.
  526.         This means that TbScan not only scans the file but also
  527.         interprets the contents and adjusts the scanning algorithm to
  528.         gain the highest reliability and speed. By reliability we do
  529.         not only mean a low 'false negative' ratio, but a low 'false
  530.         positive' ratio as well. No one needs a scanner that yells
  531.         'virus!' all the time. A good scanner should only yell 'virus!'
  532.         if there really IS a virus to be found in a file.
  533.  
  534.         Apart from the capability of adjusting the scanning algorithm,
  535.         TbScan also displays additional information about the file
  536.         itself.  It can detect instruction sequences that are intended
  537.         to cause direct disk writes, to make program code resident, to
  538.  
  539.  
  540.  
  541.                                      Page 6
  542.  
  543.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  544.  
  545.  
  546.         decrypt code, etc. TbScan even flags files as being infected by
  547.         an unknown virus if the disassembly shows that the file must
  548.         contain a virus even though a matching signature cannot be
  549.         found. All this information is displayed while a scan is being
  550.         performed!
  551.  
  552.  
  553.   1.5.  Limitations of scanners
  554.  
  555.     Although TbScan is a very sophisticated scanner, it shares some of
  556.     the limitations that all other scanners have:
  557.  
  558.     +   It cannot prevent infection.
  559.  
  560.         Virus scanners can only tell you whether or not your system has
  561.         been infected and if so, whether any damage has already been
  562.         done. By that time only a non-infected backup or a recovery pro-
  563.         gram such as TbClean will properly counter a virus infection.
  564.  
  565.     +   It cannot execute itself.
  566.  
  567.         You will have to be active in taking measures to protect your
  568.         system from virus infection. You should boot from a clean and
  569.         write-protected diskette and then execute the scanner at least
  570.         once every week, since some viruses can perfectly hide
  571.         themselves once resident in memory. Unfortunately it is an
  572.         illusion to think that employees will perform this task
  573.         correctly at all times. For company use we recommend additional
  574.         protection, in the shape of a permanently active immunizer such
  575.         as the Thunderbyte add-on card.
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.                                      Page 7
  602.  
  603.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  604.  
  605.  
  606. 2.  USAGE OF THE PROGRAM
  607.  
  608.  
  609.   2.1.  System requirements
  610.  
  611.     TbScan runs perfectly on standard machines, in line with our
  612.     philosophy that there should be a limit to limitations.
  613.  
  614.     +   TbScan requires 224 Kb of free memory. If you decide to use a
  615.         log file TbScan will need an additional 16 Kb of memory for the
  616.         log file buffer.  TbScan also allocates memory to keep all AVR
  617.         modules in memory.  If there is still memory left, TbScan will
  618.         use it to set up cache buffers in order to increase the
  619.         scanning speed. Note that the memory requirements are
  620.         independent of the number of signatures. The current memory
  621.         requirements suffice to manage at least 2500 signatures.
  622.  
  623.     +   TbScan can be executed under DOS version 3.00 (and all later
  624.         versions). However, Dos 3.3 or higher is recommended, since
  625.         TbScan has been optimized and designed primarily for use with
  626.         these DOS versions.
  627.  
  628.     +   The sum total of all AVR-modules should not exceed 64Kb.
  629.  
  630.  
  631.   2.2.  Program invocation
  632.  
  633.     TbScan is easy to use. The syntax is as follows:
  634.  
  635.             TBSCAN [@][<path>][<filename>]... [<options>]...
  636.  
  637.     Drive and path tell TbScan where it should perform its scanning
  638.     operation. To search disks C: and D: you should enter:
  639.  
  640.             TBSCAN C:\ D:\
  641.  
  642.     When no filename has been specified but a drive and/or path
  643.     instead, the specified path will be used as top-level path.  All
  644.     its subdirectories will be processed too.
  645.  
  646.     When a filename has been specified only the specified path will be
  647.     searched. Subdirectories will not be processed.
  648.  
  649.     Wildcards in the filename are allowed. You may even specify '*.*'
  650.     which will result in all files being processed.
  651.  
  652.     You can also tell TbScan to use a list file. A list file is a file
  653.     that contains a list of paths/filenames to be scanned.  Have the
  654.     filename preceded by the character '@' on the TbScan command line:
  655.  
  656.             TBSCAN @TBSCAN.LST
  657.  
  658.  
  659.  
  660.  
  661.                                      Page 8
  662.  
  663.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  664.  
  665.  
  666.   2.3.  While scanning
  667.  
  668.     TbScan divides the screen into three windows: an information
  669.     window, a scanning window and a status window. The upper window is
  670.     the information window and it initially displays the comments found
  671.     in the data file.
  672.  
  673.     If TbScan detects infected files the names of the file and the
  674.     virus will be displayed in the upper window. The information will
  675.     stack up and scroll off the screen if it doesn't fit anymore.
  676.  
  677.     The lower left window displays the names of the files being
  678.     processed, the algorithm in use, info and heuristic flags,
  679.     and finally an OK statement or the name of the virus
  680.     detected.
  681.  
  682.     Example:
  683.     TEST.EXE   <Scanning...>  FR        OK
  684.        |          |           |         |
  685.        |          |           |         result of scan
  686.        |          |           heuristic flags
  687.        |          algorithm being used to process file
  688.        name of file in process
  689.  
  690.     You will see comments following each file name:
  691.     'Looking', 'Checking', 'Tracing', 'Browsing', 'Scanning' or
  692.     'Skipping'. These refer to the various algorithms being used to
  693.     scan files.
  694.  
  695.     Other comments that TbScan can display here are the heuristic
  696.     flags.  Consult the 'Heuristic flags' chapter (3.5) for more
  697.     information on these warning characters.
  698.  
  699.     The lower right window is the status window. It displays the number
  700.     of files and directories encountered, the amount of viruses found,
  701.     etc.
  702.  
  703.     The cache hit indicator displays the percentage of FAT or directory
  704.     information that has been retrieved from the cache buffers, or in
  705.     other words, the percentage of disk access saved.  Note that the
  706.     cache hit only applies to the FAT and directory sectors. The
  707.     contents of files will never be cached and will not be reflected in
  708.     the cache hit indicator.
  709.  
  710.     The process can be aborted by pressing Ctrl-Break.
  711.  
  712.  
  713.   2.4.  Detecting viruses
  714.  
  715.     As soon as an infected program is found, the name of the virus will
  716.     be displayed. If you did not specify one of the options 'batch',
  717.     'rename', 'delete' or 'move', TbScan will prompt you to delete,
  718.  
  719.  
  720.  
  721.                                      Page 9
  722.  
  723.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  724.  
  725.  
  726.     rename or move the infected file, or to continue without action. If
  727.     you choose to rename the file, the first character of the extension
  728.     will be replaced by the character 'V'. This prevents the file from
  729.     being executed accidentally before it has been investigated more
  730.     thoroughly. If you choose to move the file, the file will be moved
  731.     to the TbScan directory or to the directory specified by option
  732.     'path'.
  733.  
  734.     In some situations TbScan will offer you an additional menu option:
  735.     V)alidate program. For more information about this menu option
  736.     consult option 'Program validation'.
  737.  
  738.  
  739.     When TbScan detects an infected file it will display a message like:
  740.  
  741.                 Infected by [name of virus]
  742.  
  743.     It is also possible that TbScan detects a bootsector virus dropper.
  744.     A dropper is a program that has not been infected itself, but which
  745.     does contain a bootsector virus and is able to install it in your
  746.     bootsector. If TbScan detects a bootsector virus in a file it
  747.     displays the message:
  748.  
  749.                 Dropper of [name of virus]
  750.  
  751.     It is also possible that TbScan encounters a file that seems to be
  752.     infected by a virus, although a signature could not be found. In
  753.     this case TbScan displays the prefix 'Probably' before the message.
  754.  
  755.     If you have specified option 'heuristic' or 'mutant' or both, it is
  756.     likely that TbScan will find some files which looks like a virus,
  757.     and in this case TbScan uses the prefix 'Might be' to inform you
  758.     about it.  So, if TbScan displays
  759.                 Might be infected by [name of virus]
  760.     it does not mean that the file is infected, but just that the file
  761.     might be infected by a virus. There are a lot of files that look
  762.     like a virus but they aren't.
  763.  
  764.     TbScan needs access to its data file to be able to tell you the
  765.     name of a virus. If it cannot access the data file it displays the
  766.     message [Cannot read datafile] instead of a virus name.
  767.  
  768.  
  769.   2.5.  Integrity checking
  770.  
  771.     TbScan will also perform integrity checking while scanning. You
  772.     have to use TbSetup to generate the Anti-Vir.Dat files. Once these
  773.     files exist on your system TbScan will check that every file being
  774.     scanned matches the information maintained in the Anti-Vir.Dat
  775.     files. If a virus infects a file, the maintained information will
  776.     not match anymore with the now changed file, and TbScan will inform
  777.     you about this. There are no command line options to enable this
  778.  
  779.  
  780.  
  781.                                     Page 10
  782.  
  783.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  784.  
  785.  
  786.     feature: TbScan will perform integrity checking automatically
  787.     if it detects the Anti-Vir.Dat files. Note that TbScan only reports
  788.     file changes that could indicate a virus. Internal configuration
  789.     areas of program files may also change, but TbScan does normally
  790.     not report this. However, if a file gets infected with any virus -
  791.     known or unknown - the vital information will change and TbScan
  792.     will indeed report it to you!
  793.  
  794.     It is however possible that the checked file changes itself or
  795.     changes frequently due to another cause. In this case you might
  796.     want to exclude the program from integrity checking to avoid future
  797.     false alarms. TbScan will offer you an additional menu option:
  798.     'V)alidate program'. For more information about this menu option
  799.     consult option 'Program validation'.
  800.  
  801.  
  802.   2.6.  Heuristic scanning
  803.  
  804.     TbScan is not just a signature scanner. It also disassembles the
  805.     file being processed. This serves three purposes:
  806.  
  807.     1) By disassembling the file the scanner can restrict itself to the
  808.        area of the file where the virus might reside, reducing false
  809.        alarms and speeding up the process.
  810.     2) It makes it possible to use the algorithmic detection method on
  811.        encrypted viruses whose signatures would otherwise remain
  812.        invisible to the scanner.
  813.     3) And it makes it possible to detect suspicious instruction
  814.        sequences.
  815.  
  816.     The detection of suspicious instruction sequences is named
  817.     'heuristic scanning'. It is a very powerful feature that enables
  818.     you to detect new or modified viruses and to verify the results of
  819.     the signature scan. You no longer have to rely on the vendor of the
  820.     scanner having the same virus as you might have. In normal cases a
  821.     scanner can only find a virus if the developer of the scanner has
  822.     had a sample of that virus, to be able to make a suitable
  823.     signature. With heuristic scanning a signature is no longer
  824.     required, so the scanner can detect viruses that are not known to
  825.     the developer of the scanner. You should not underestimate the
  826.     importance of heuristic scanning, as every month there appear at
  827.     least 50 new viruses. It is very unlikely that the developer of a
  828.     scanner is the first one that gets those new viruses...
  829.  
  830.     How does heuristic scanning actually work? Every program contains
  831.     instructions for the processor of the PC. By looking into the file
  832.     contents and by interpreting the instructions TbScan is able to
  833.     detect the purpose of these instructions. If the purpose seems to
  834.     be to format a disk, or to infect a file, TbScan issues a
  835.     warning. There are a lot of instruction sequences which are very
  836.     common for viruses, but very unlikely for normal programs. Every
  837.     suspicious instruction sequence is assigned to a character: a
  838.  
  839.  
  840.  
  841.                                     Page 11
  842.  
  843.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  844.  
  845.  
  846.     heuristic flag. Every heuristic flag has a score. If the total
  847.     score exceeds a predefined limit, TbScan assumes the file contains
  848.     a virus.
  849.  
  850.     There are actually two predefined limits: the first one is quite
  851.     sensitive and can be reached by some normal innocent programs. If
  852.     this limit is reached, TbScan highlights the heuristic flags that
  853.     are displayed on the screen and increases the 'suspected items'
  854.     counter, but TbScan does not indicate there is a virus, unless you
  855.     have specified option 'heuristic'. If you have specified option
  856.     'heuristic', TbScan tells you that the file 'Might be infected by
  857.     an unknown virus'. The second heuristic-limit will be triggered by
  858.     a lot of viruses, but not by normal programs. If this limit is
  859.     reached TbScan tells you that the file is 'Probably infected by an
  860.     unknown virus.'
  861.  
  862.  
  863.     Heuristic level 1                  Heuristic level 2
  864.     --------------------------------   ----------------------------
  865.     Always enabled                     Only with option 'heuristic'
  866.     Detects 50% of the unknown viruses Detects 90% of the viruses
  867.     Almost never causes false alarms   Causes a few false alarms
  868.     Displays 'Probably infected'       Displays 'Might be infected'
  869.  
  870.  
  871.     TEST.EXE <scanning...>      OK           (no flags)
  872.     TEST.EXE <scanning...> R    OK           (nothing serious)
  873.     TEST.EXE <scanning...> FRM
  874.      might be infected by an unknown virus   (reached level 2)
  875.     TEST.EXE <scanning...> FRALM#
  876.      probably infected by an unknown virus   (reached level 1)
  877.  
  878.  
  879.     Note that unlike other scanners, TbScan has heuristic scanning
  880.     always enabled. Whether TbScan decides to inform the user of
  881.     a possible virus depends on the heuristic score, unless option
  882.     'heuristic' has been specified.
  883.  
  884.     Heuristic flags consist of single characters that are printed behind
  885.     the name of the file that has been processed. There are two kinds
  886.     of flags: the informative ones are printed in lower-case
  887.     characters, and the more serious flags are printed in upper-case
  888.     characters. The lower-case flags are indicative of special
  889.     characteristics of the file being processed, whereas the upper-case
  890.     warnings may indicate a virus. If the 'loglevel' is 3 or above, the
  891.     important warnings will not only appear as a warning character, but
  892.     there will also be a description printed in the log file.
  893.  
  894.     How should you treat the flags? The less important lower-case
  895.     flags can be considered to be for your information only. They
  896.     provide you with file information you might find interesting.  The
  897.     more serious warning flags printed in upper-case MIGHT point
  898.  
  899.  
  900.  
  901.                                     Page 12
  902.  
  903.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  904.  
  905.  
  906.     towards a virus. It is quite normal that you have some files in
  907.     your system which trigger an upper-case flag.
  908.  
  909.     Anyway, if TbScan does not highlight a combination of warnings you
  910.     should not pay too much attention to these flags. For more than 90%
  911.     of the viruses TbScan will highlight the flags (or even indicates
  912.     the file as infected if option 'heuristic' is specified), so it is
  913.     unlikely that a file which only has some flags set really contains
  914.     a virus.
  915.  
  916.     Note!
  917.     TbScan performs heuristic analysis only nearby the entry-point of a
  918.     file, so it is normal that TbScan does not detect that some disk
  919.     utilities write to disk directly, and it is normal that TbScan does
  920.     not detect that some programs are TSR programs. This is just the
  921.     result of one approach to minimize false alarms. In case of a
  922.     virus, the offending instructions are always nearby the entry-point
  923.     (except when the virus is over 10Kb in size) so TbScan will detect
  924.     the suspicious facts in these situations anyway.
  925.  
  926.   2.6.1.  False positives.
  927.  
  928.     Important!
  929.  
  930.     False alarms are part of the nature of heuristic scanning. In
  931.     default mode it is very unlikely that TbScan issues a false alarm.
  932.     However, if you have specified option 'heuristic' some false alarms
  933.     might occur. How to deal with these false alarms? If TbScan thinks
  934.     it has found a virus it tells you the reason for this suspicion. In
  935.     most cases you will be able to evaluate these reasons when you
  936.     consider the purpose of the suspected file.
  937.  
  938.     Note that viruses infect other programs. It is highly unlikely that
  939.     you will find only a few infected files on a hard disk used
  940.     frequently. You should ignore a the result of a heuristic scan if
  941.     only a few programs on your hard disk trigger it. But, if your
  942.     system behaves in a 'strange' manner and many programs cause TbScan
  943.     to issue an alarm with the same serious flags, your system could
  944.     very well be infected by a (yet unknown) virus.
  945.  
  946.     If TbScan finds a file to be very suspicious and pops up with the
  947.     virus alert window, you can avoid future false alarms by pressing
  948.     'V' (Validate program). Note that this only works if there is an
  949.     Anti-Vir.Dat record of the file available. Once a program is
  950.     validated it will no longer be subject to heuristic analyzis,
  951.     unless the program changes and does not match the Anti-Vir.Dat
  952.     record anymore. This will be the case if such a file gets infected
  953.     afterwards, so TbScan will still report infections on these files.
  954.     Note that a validated program is still subject to the conventional
  955.     signature scanning.
  956.  
  957.  
  958.  
  959.  
  960.  
  961.                                     Page 13
  962.  
  963.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  964.  
  965.  
  966.   2.6.2.  C - File has been changed.
  967.  
  968.     This warning can only appear if you used TbSetup to generate the
  969.     Anti-Vir.Dat files. If this warning appears this means that the
  970.     file has been changed. If you did not upgrade the software it is
  971.     very likely that a virus infected the file! Note that TbScan does
  972.     not display this warning if only some internal configuration area
  973.     of the file changes. This warning means that code at the program
  974.     entry point, the entry-point itself and/or the file size have been
  975.     changed.
  976.  
  977.   2.6.3.  c - No integrity check.
  978.  
  979.     This warning indicates that no checksum/recovery information has
  980.     been found about the indicated file. It is highly recommended to
  981.     use TbSetup in this case to store information of the mentioned
  982.     file. This info can later be used for integrity checking and to
  983.     recover from virus infections.
  984.  
  985.   2.6.4.  F - Suspicious file access.
  986.  
  987.     TbScan has found instruction sequences common to infection schemes
  988.     used by viruses. This flag will appear with those programs that
  989.     are able to create or modify existing files.
  990.  
  991.   2.6.5.  R - Suspicious relocator.
  992.  
  993.     Flag 'R' refers to a suspicious relocator. A relocator is a
  994.     sequence of instructions that changes the proportion of CS:IP. It
  995.     is often used by viruses, especially COM type infectors. Tests on a
  996.     large collection of viruses show that TbScan issues this flag for
  997.     about 65% of all viruses. Those viruses have to relocate the CS:IP
  998.     proportion because they have been compiled for a specific location
  999.     in the executable file; a virus that infects another program can
  1000.     hardly ever use its original location in the file as it is appended
  1001.     to this file. Sound programs 'know' their location in the
  1002.     executable file, so they don't have to relocate themselves. On
  1003.     systems that operate normally only a small percentage of the
  1004.     programs should therefore cause this flag to be displayed.
  1005.  
  1006.   2.6.6.  A - Suspicious Memory Allocation.
  1007.  
  1008.     The program uses a non-standard way to search for, and/or allocate
  1009.     memory. A lot of viruses try to hide themselves in memory so they use
  1010.     a non-standard way to allocate this memory. Some programs
  1011.     (high-loaders or diagnostic software) also use non-standard ways
  1012.     to search or allocate memory.
  1013.  
  1014.   2.6.7.  N - Wrong name extension.
  1015.  
  1016.     Name conflict. The program carries the extension .EXE but appears
  1017.     to be an ordinary .COM file, or it has the extension .COM but the
  1018.  
  1019.  
  1020.  
  1021.                                     Page 14
  1022.  
  1023.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  1024.  
  1025.  
  1026.     internal layout of an .EXE file. TbScan does not take any risk in
  1027.     this situation, but scans the file for both EXE and COM type
  1028.     signatures. A wrong name extension might in some cases indicate a
  1029.     virus, but in most cases it doesn't.
  1030.  
  1031.   2.6.8.  S - Search for executables.
  1032.  
  1033.     The program searches for *.COM or *.EXE files. This by itself does
  1034.     not indicate a virus, but it is an ingredient of most viruses anyway
  1035.     (they have to search for suitable files to spread themselves).  If
  1036.     accompanied by other flags, TbScan will assume the file is infected
  1037.     by a virus.
  1038.  
  1039.   2.6.9.  # - Decryptor code found.
  1040.  
  1041.     The file possibly contains a self-decryption routine. Some
  1042.     copy-protected software is encrypted so this warning may appear for
  1043.     some of your files. But if this warning appears in combination
  1044.     with, for example, the 'T' warning, there could be a virus involved
  1045.     and TbScan assumes the file is contaminated! Many viruses encrypt
  1046.     themselves and cause this warning to be displayed.
  1047.  
  1048.   2.6.10.  V - Validated program
  1049.  
  1050.     The program has been validated to avoid false alarms.
  1051.  
  1052.     -   The design of this program would normally cause a false alarm
  1053.         by the heuristic scan mode of TbScan.
  1054.  
  1055.     or:
  1056.  
  1057.     -   This program might change frequently, and the file is excluded
  1058.         from integrity checking.
  1059.  
  1060.     These exclusions are stored in the Anti-Vir.Dat file by either
  1061.     TbSetup (automatically) or by TbScan (manually).
  1062.  
  1063.   2.6.11.  E - Flexible Entry-point
  1064.  
  1065.     The program starts with a routine that determines the location of
  1066.     itself within the program file. This is rather suspicious because
  1067.     sound programs have a fixed entry-point so they do not have to
  1068.     determine this location. For viruses however this is quite common:
  1069.     about 50% of the available viruses cause this flag to be displayed.
  1070.  
  1071.     The DOS FORMAT.COM program is an instance where this flag will be
  1072.     displayed by TbScan. This cannot be avoided because Microsoft did
  1073.     some strange things to this program. It appears that the file was
  1074.     originally an .EXE file which has been converted into a .COM file
  1075.     by adding a shell-like structure to it. (What is actually the
  1076.     difference between infecting a file and converting it this way?)
  1077.     Anyway, you should ignore this warning as to the DOS FORMAT
  1078.  
  1079.  
  1080.  
  1081.                                     Page 15
  1082.  
  1083.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  1084.  
  1085.  
  1086.     program.
  1087.  
  1088.   2.6.12.  L - program Load trap.
  1089.  
  1090.     The program might trap the execution of other software. If the
  1091.     file also causes flag M (memory resident code) to be displayed, it
  1092.     is very likely that the file is a resident program that determines
  1093.     when another program is executed. A lot of viruses trap the program
  1094.     load and use it to infect the program. Some anti-virus utilities
  1095.     also trap the program load.
  1096.  
  1097.   2.6.13.  D - Direct disk access.
  1098.  
  1099.     This flag is displayed if the program being processed has
  1100.     instructions near the entry-point to write to a disk directly. It
  1101.     is quite normal that some disk-related utilities cause this flag
  1102.     to be displayed. As usual, if many of your files (which have no
  1103.     business writing directly to the disk) cause this flag to be
  1104.     displayed, your system might be infected by an unknown virus.
  1105.  
  1106.     Note that a program that accesses the disk directly does not always
  1107.     have to be marked by the 'D' flag. Only when the direct disk
  1108.     instructions are near the program entry point it will be reported
  1109.     by TbScan. If a virus is involved the harmful instructions are
  1110.     always near the entry point and that is the place where TbScan
  1111.     looks for them.
  1112.  
  1113.   2.6.14.  M - Memory resident code.
  1114.  
  1115.     TbScan has found instruction sequences which could cause the
  1116.     program to hook into important interrupts.  A lot of TSR (Terminate
  1117.     and Stay Resident) programs will trigger this flag, because
  1118.     hooking into interrupts is part of their usual behavior. However,
  1119.     if a lot of non-TSR programs cause this warning flag to appear, you
  1120.     should be suspicious. It is then likely that your files have been
  1121.     infected by a virus that remains resident in memory.
  1122.  
  1123.     Note that this warning does not appear with all true TSR programs.
  1124.     Nor can TSR detection in non-TSR programs always be relied upon.
  1125.  
  1126.   2.6.15.  ! - Invalid program.
  1127.  
  1128.     Invalid opcode (non-8088 instructions) or out-of-range branche.
  1129.  
  1130.     The program has either an entry point that has been located outside
  1131.     the body of the file, or reveals a chain of 'jumps' that can be
  1132.     traced to a location outside the program file.
  1133.  
  1134.     Another possibility is that the program contains invalid processor
  1135.     instructions.
  1136.  
  1137.     The program being checked is probably damaged, and cannot be
  1138.  
  1139.  
  1140.  
  1141.                                     Page 16
  1142.  
  1143.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  1144.  
  1145.  
  1146.     executed in most cases. Anyway, TbScan does not take any risk and
  1147.     uses the 'scan' or 'browse' method to scan the file.
  1148.  
  1149.   2.6.16.  T - Invalid timestamp.
  1150.  
  1151.     The timestamp of the program is invalid: e.g. the number of seconds
  1152.     in the timestamp is illegal, or the date is illegal or later than
  1153.     the year 2000. This is suspicious because many viruses set the
  1154.     timestamp to an illegal value (like 62 seconds) to mark that they
  1155.     already infected the file, preventing themselves from infecting a
  1156.     file for a second time round. It is possible that the program being
  1157.     checked is contaminated with a virus that is still unknown,
  1158.     especially if many files on your system have an invalid timestamp.
  1159.     If only a very few programs have an invalid timestamp you'd better
  1160.     correct it and scan frequently to check that the timestamp of the
  1161.     files remain valid.
  1162.  
  1163.   2.6.17.  J - Suspicious jump construct.
  1164.  
  1165.     The program did not start at the program entry point. The code has
  1166.     jumped at least two times before reaching the final start-up code,
  1167.     or the program jumped using an indirect operand. Sound programs
  1168.     should not display this kind of strange behavior. If many files
  1169.     cause this warning to be displayed, you should investigate your
  1170.     system thoroughly.
  1171.  
  1172.   2.6.18.  ? - Inconsistent header.
  1173.  
  1174.     The program being processed has an exe-header that does not reflect
  1175.     the actual program lay-out. The DOS SORT.EXE program will cause
  1176.     this warning to be displayed, because the actual size of the
  1177.     program file is less than reported in the 'size-of-load module'
  1178.     field in the exe-header! Many viruses do not update the exe-header
  1179.     of an EXE file correctly after they have infected the file, so if
  1180.     this warning appears a lot it seems you have a problem. You should
  1181.     ignore this warning for the DOS SORT.EXE program. (Hopefully
  1182.     MicroSoft will correct the problem before the next release of DOS).
  1183.  
  1184.   2.6.19.  G - Garbage instructions.
  1185.  
  1186.     The program contains code that seems to have no purpose other than
  1187.     encryption or avoiding recognition by virus scanners. This flag is
  1188.     very important, in fact it is the only flag that will cause TbScan
  1189.     to report an infection without the presence of any other flags.  In
  1190.     most cases there will not be any other flags since the file is
  1191.     encrypted and the instructions are hidden from the scanner.  In a
  1192.     few cases this flag will appear for 'normal' files. These files
  1193.     however are badly designed and that is the reason the 'garbage'
  1194.     flag appears.
  1195.  
  1196.   2.6.20.  U - Undocumented system call.
  1197.  
  1198.  
  1199.  
  1200.  
  1201.                                     Page 17
  1202.  
  1203.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  1204.  
  1205.  
  1206.     The program uses unknown DOS calls or interrupts. These unknown
  1207.     calls can be issued to invoke undocumented DOS features, or to
  1208.     communicate with an unknown driver in memory. Since a lot of
  1209.     viruses use undocumented DOS features, or communicate with memory
  1210.     resident parts of a previously loaded instance of the virus, it is
  1211.     suspicious if a program performs unknown or undocumented
  1212.     communications. However, it does not necessarily indicate a virus
  1213.     because some 'tricky' programs use undocumented features too.
  1214.  
  1215.   2.6.21.  Y - Invalid bootsector.
  1216.  
  1217.     The bootsector is not completely according to the IBM defined
  1218.     bootsector format. It is likely that the bootsector contains a
  1219.     virus or has been corrupted.
  1220.  
  1221.   2.6.22.  Z - EXE/COM determinator.
  1222.  
  1223.     The program seems to check whether a file is a COM or EXE type
  1224.     program. Infecting a COM file is a process that is not similar to
  1225.     infecting an EXE file, so viruses that are able to infect both
  1226.     program types should be able to distinguish between them.
  1227.  
  1228.     There are of course also innocent programs that need to find out
  1229.     whether a file is a COM or EXE file. Executable file compressors,
  1230.     EXE2COM converters, debuggers, and high-loaders are examples of
  1231.     programs that may contain a routine to distinguish between EXE and
  1232.     COM files.
  1233.  
  1234.   2.6.23.  O - code Overwrite.
  1235.  
  1236.     This flag will be displayed if TbScan detects that the program
  1237.     overwrites some of its own instructions. However, it does not seem
  1238.     to have a complete (de)cryptor routine.
  1239.  
  1240.   2.6.24.  B - Back to entry.
  1241.  
  1242.     The program seems to execute some code, and after that it jumps
  1243.     back to the entry-point of the program. Normally this would result
  1244.     in an endless loop, except when the program has also modified some
  1245.     of its instructions. This is quite common behavior for computer
  1246.     viruses. In combination with any other flag TbScan will report a
  1247.     virus.
  1248.  
  1249.   2.6.25.  K - Unusual stack.
  1250.  
  1251.     The EXE file being processed has an odd (instead of even) stack
  1252.     offset or a suspicious stack segment. Many viruses are quite buggy
  1253.     by setting up an illegal stack value.
  1254.  
  1255.   2.6.26.  p - Packed or compressed file.
  1256.  
  1257.     The program has been packed or compressed. There are some utilities
  1258.  
  1259.  
  1260.  
  1261.                                     Page 18
  1262.  
  1263.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  1264.  
  1265.  
  1266.     that are able to compress a program file, like EXEPACK or PKLITE.
  1267.     If the file was infected after the file had been compressed, TbScan
  1268.     will be able to detect the virus. However, if the file had already
  1269.     been infected before it was compressed, the virus has also been
  1270.     compressed in the process, and a virus scanner might not be able to
  1271.     recognize the virus anymore.
  1272.  
  1273.     Fortunately, this does not happen a lot, but you should beware! A
  1274.     new program might look clean, but can turn out to be the carrier of
  1275.     a compressed virus. Other files in your system will then be
  1276.     infected too, and it is these infections that will be clearly
  1277.     visible to virus scanners.
  1278.  
  1279.   2.6.27.  w - Windows or OS/2 header.
  1280.  
  1281.     The program can be or is intended to be used in a Windows (or OS/2)
  1282.     environment. As yet TbScan does not offer a specialized scanning
  1283.     method for these files. Of course that will change as soon as
  1284.     Windows- or OS/2-specific viruses start occurring.
  1285.  
  1286.   2.6.28.  h - Hidden or System file.
  1287.  
  1288.     The file has the 'Hidden' or the 'System' file attribute set.  This
  1289.     means that the file is not visible in a DOS directory display but
  1290.     TbScan will scan it anyway. If you don't know the origin and/or
  1291.     purpose of this file, you might be dealing with a 'Trojan Horse' or
  1292.     a 'joke' virus program. Copy such a file onto a diskette; then
  1293.     remove it from it's program environment and check if the program
  1294.     concerned is missing the file. If a program does not miss it, you
  1295.     will have freed some disk space, and maybe you have saved your
  1296.     system from future disaster in the process.
  1297.  
  1298.   2.6.29.  i - Internal overlay.
  1299.  
  1300.     The program being processed has additional data or code behind the
  1301.     load-module as specified in the exe-header of the file. The program
  1302.     might have internal overlay(s), or configuration or debug
  1303.     information appended behind the load-module of the EXE file.
  1304.  
  1305.  
  1306.   2.7.  Program validation.
  1307.  
  1308.     This chapter only applies if you use TbSetup to generate the
  1309.     Anti-Vir.Dat records. Without these records program validation is
  1310.     not an option.
  1311.  
  1312.     TbScan will perform as intended on most programs. However, there
  1313.     are some programs that require special attention, in order to avoid
  1314.     false alarms. Most of these programs are recognized automatically
  1315.     by the TbSetup program. However, it is certainly possible that you
  1316.     have a few files on your system that meet the following criteria:
  1317.  
  1318.  
  1319.  
  1320.  
  1321.                                     Page 19
  1322.  
  1323.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  1324.  
  1325.  
  1326.     1) Programs that trigger the heuristic alarm of TbScan.
  1327.     2) Programs that change frequently.
  1328.  
  1329.     If an 'infection' has been found with the heuristic analyzis or
  1330.     integrity checking only and if there is a Anti-Vir.Dat record
  1331.     available, TbScan offers an additional option in its virus-alert
  1332.     window:  'V)alidate program'.  If you are convinced that the
  1333.     indicated program does NOT contain a virus, you can press 'V' to
  1334.     set a flag in the program's record.  This makes it possible to
  1335.     avoid future false alarms.
  1336.  
  1337.     There are two validation modes: if the TbScan virus alarm is due
  1338.     to a file change, the validation applies to future file changes
  1339.     only, if the virus alarm is due to heuristic analysis, the
  1340.     validation only applies to heuristic results. When the file is
  1341.     exluded from heuristic analysis the file will still be checksummed,
  1342.     if the file is excluded from integrity checking TbScan will still
  1343.     perform heuristic analysis on that file.
  1344.  
  1345.     Note: if you replaced a file (software upgrade) and you did not use
  1346.     TbSetup, TbScan will pop-up its virus alert window to inform you
  1347.     about the file change. Do NOT select the validation option in this
  1348.     case, because this would exclude the file for future integrity
  1349.     checking. You had better abort TbScan and run TbSetup on the
  1350.     changed file(s).
  1351.  
  1352.  
  1353.   2.8.  Command line options
  1354.  
  1355.     It is possible to specify options on the command line. Tbscan
  1356.     recognizes option short-keys and option words. The words are easier
  1357.     to memorize, and they will be used in this manual for convenience.
  1358.  
  1359.     optionword  parameter short  explanation
  1360.     ----------  --------- ----- -------------------------------------
  1361.  
  1362.     help                    he  =help (-? = short help)
  1363.     pause                   pa  =enable 'Pause' prompt
  1364.     mono                    mo  =force monochrome
  1365.     quick                   qs  =quick scan (uses Anti-Vir.Dat)
  1366.     allfiles                af  =scan non-executable files too
  1367.     mutant                  mu  =enable fuzzy search
  1368.     heuristic               hr  =enable heuristic alerts
  1369.     direct                  dd  =direct calls into DOS/BIOS
  1370.     extract                 ex  =extract signature (registered only)
  1371.     valid                   va  =force signature file authorization
  1372.     once                    oo  =only once a day
  1373.     secure                  se  =user abort now allowed (reg. only)
  1374.     compat                  co  =maximum-compatibility mode
  1375.     ignofile                in  =ignore no-file-error
  1376.     noboot                  nb  =skip bootsector check
  1377.     sector                  ss  =scan all disk sectors
  1378.  
  1379.  
  1380.  
  1381.                                     Page 20
  1382.  
  1383.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  1384.  
  1385.  
  1386.     nomem                   nm  =skip memory check
  1387.     hma                     hm  =force HMA scan
  1388.     nohmem                  nh  =skip UMB/HMA scan
  1389.     nosub                   ns  =skip sub-directories
  1390.     noavr                   na  =do not use AVR-modules
  1391.     repeat                  rp  =scan multiple diskettes
  1392.     batch                   ba  =batch mode. No user input
  1393.     delete                  de  =delete infected files
  1394.     move                    mv  =move infected files
  1395.     expertlog               el  =no heuristic descriptions in log
  1396.     log      [=<filename>]  lo  =append log file
  1397.     session  [=<filename>]  sl  =create session log file
  1398.     loglevel =<0..4>        ll  =set log level
  1399.     path     =<move-path>   mp  =set move-path
  1400.     rename   [=<ext-mask>]  rn  =rename infected files
  1401.     sigfile  [=<filename>]  sf  =signature file to be used
  1402.  
  1403.    2.8.1.  help (he)
  1404.  
  1405.     If you specify this option TbScan displays the contents of the
  1406.     TBSCAN.HLP file if it is available in the home directory of TbScan.
  1407.     If you specify the '?' option you will get the summarized help info
  1408.     as listed above.
  1409.  
  1410.    2.8.2.  pause (pa)
  1411.  
  1412.     When you enter option 'pause' TbScan will stop after it has checked
  1413.     the contents of one window.  This gives you the possibility to
  1414.     examine the results without having to consult a log file
  1415.     afterwards.
  1416.  
  1417.    2.8.3.  mono (mo)
  1418.  
  1419.     This option forces TbScan to refrain from using colors in the
  1420.     screen output. This might enhance the screen output on some LCD
  1421.     screens or color-emulating monochrome systems.
  1422.  
  1423.    2.8.4.  quick (qs)
  1424.  
  1425.     If you specify this option TbScan will use the Anti-Vir.Dat files
  1426.     to check for file changes since the last time only. If a file has
  1427.     been changed (CRC change) or is not yet listed in Anti-Vir.Dat it
  1428.     will be scanned.
  1429.  
  1430.    2.8.5.  allfiles (af)
  1431.  
  1432.     This option causes TbScan to scan non-executable files (files
  1433.     without extension COM, EXE, SYS or BIN) too. If TbScan finds out
  1434.     that such a file does not contain anything that can be executed by
  1435.     the processor the file will be 'skipped'. Otherwise the file will
  1436.     be searched for AVR, COM, EXE and SYS signatures. TbScan however
  1437.     will not perform heuristic analysis on these files.
  1438.  
  1439.  
  1440.  
  1441.                                     Page 21
  1442.  
  1443.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  1444.  
  1445.  
  1446.     Since viruses do not infect non-executable files it is not
  1447.     necessary to scan non-executable files too. We even recommend not
  1448.     to use this option unless you have a good reason to scan all files.
  1449.     Once again: a virus needs to be executed to perform what it is
  1450.     programmed to do, and since non-executable files will not be
  1451.     executed a virus in such a file can not do anything. For this
  1452.     reason viruses do not even try to infect such files.
  1453.  
  1454.    2.8.6.  mutant (mu)
  1455.  
  1456.     TbScan is able to detect mutants of viruses while performing a
  1457.     regular (default) scan, since many of its signature search keys
  1458.     contain wildcards. However, if you use the 'mutant' option TbScan
  1459.     does not restrict itself to the wildcard specification, but allows
  1460.     up to two extra changes anywhere in the signature. Needless to say,
  1461.     if you use this option false alarms may occur. Therefore this
  1462.     option is not recommended to be used in a regular scan session.
  1463.     However, you should use this option if you suspect that your system
  1464.     has been infected even though TbScan has not detected a virus
  1465.     during its regular scan. If you scan again, specifying the 'mutant'
  1466.     option TbScan could then report many files to be 'possibly
  1467.     infected' by one particular virus. This would point to an infection
  1468.     by a yet unknown variant of this virus.
  1469.  
  1470.     If you are faced with a situation like this, we recommend you to
  1471.     have one such 'possibly infected' file examined by a virus expert
  1472.     before embarking on a clean-up operation.
  1473.  
  1474.    2.8.7.  heuristic (hr)
  1475.  
  1476.     TbScan always performs a heuristic scan on the files being
  1477.     processed. However, only if a file is very probably infected with a
  1478.     virus TbScan will report the file as being infected. If you use
  1479.     option 'heuristic' TbScan is somewhat more sensitive. In this mode
  1480.     90% of the new, unknown, viruses will be detected without any
  1481.     signature, but some false alarms may occur. Consult also chapter
  1482.     2.5 ('Heuristic scanning').
  1483.  
  1484.    2.8.8.  direct (dd)
  1485.  
  1486.     TbScan communicates with DOS through interrupt 21h and with the 
  1487.     disk BIOS via interrupt 13h.  To prevent this from being 
  1488.     'monitored' by viruses, option 'direct' can be entered on the 
  1489.     command line.  TbScan will use its built-in debugger to trace 
  1490.     through the chain of interrupts until it has reached the DOS and 
  1491.     BIOS entry point. These addresses are shown on the display and from 
  1492.     then on they will be used for the communication with DOS and the 
  1493.     BIOS. Resident programs, such as viruses, are then excluded from 
  1494.     taking part in the virus scan process.
  1495.  
  1496.     Please note that your regular resident programs will not be aware
  1497.     of TbScan's file access either. That is why we do not recommend
  1498.  
  1499.  
  1500.  
  1501.                                     Page 22
  1502.  
  1503.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  1504.  
  1505.  
  1506.     the use of this option in a multi-tasking or network environment.
  1507.  
  1508.     Also note that many protection software packages will be fooled by
  1509.     TbScan when it uses the 'direct' option.  Don't be surprised when
  1510.     TbScan scans files you don't actually have any access to...
  1511.  
  1512.     When you use this option do not pop up resident programs while
  1513.     TbScan is active!  This is because resident programs are not aware
  1514.     of the fact that a program performs file access in the foreground
  1515.     and a system crash may be the result.
  1516.  
  1517.     When you have installed the Thunderbyte card in your PC, or if you 
  1518.     are using TbDriver/TbDisk, TbScan will not bypass these anti virus 
  1519.     products. This is necessary to avoid alarms. Viruses invoked AFTER 
  1520.     the anti virus utilities will still be bypassed by TbScan.
  1521.  
  1522.    2.8.9.  extract (ex)
  1523.  
  1524.     This option is available to registered users only. See the chapter
  1525.     'Defining a Signature' (4.4.) on how to use the option 'extract'.
  1526.  
  1527.    2.8.10.  valid (va)
  1528.  
  1529.     As a standard procedure TbScan checks the signature file for
  1530.     modifications.  If you have changed the contents of that file,
  1531.     TbScan will issue a warning to that effect. If you don't want this
  1532.     warning to be displayed, use the 'valid' option.
  1533.  
  1534.    2.8.11.  once (oo)
  1535.  
  1536.     If you specify this option TbScan will 'remember' after its scan
  1537.     that is has been executed that day, and that it should not be run
  1538.     again the same day with this particular option set. This option is
  1539.     very useful if you incorporate it in your AUTOEXEC.BAT file in
  1540.     combination with a list file:
  1541.  
  1542.                 TbScan @Everyday.Lst once rename
  1543.  
  1544.     TbScan will now scan the list of files and/or paths specified in
  1545.     the file EVERYDAY.LST during the first boot-up of the day. If the
  1546.     systems boots more often that day, TbScan will then return to DOS
  1547.     immediately.  This option does not interfere with the regular use
  1548.     of TbScan. If you invoke TbScan without the 'once' option it will
  1549.     always run, regardless of a previous run with the 'once' option set.
  1550.  
  1551.     Note that TbScan 'once' will be executed regardless of regular
  1552.     TbScan sessions earlier that day.
  1553.  
  1554.     Also note that if TbScan cannot write to TBSCAN.EXE because it has
  1555.     been flagged 'read-only' or is located on a write-protected
  1556.     diskette, the 'once' option will fail and the scanner will run
  1557.     without it.
  1558.  
  1559.  
  1560.  
  1561.                                     Page 23
  1562.  
  1563.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  1564.  
  1565.  
  1566.    2.8.12.  secure (se)
  1567.  
  1568.     This option is available to registered users only. If this option
  1569.     is specified it is no longer possible to cancel TbScan by pressing
  1570.     Ctrl-Break, or to respond to a virus alert window.
  1571.  
  1572.    2.8.13.  compat (co)
  1573.  
  1574.     If you specify this option, TbScan attempts to be more compatible
  1575.     with your system. Use this option if the program does not behave as
  1576.     can be expected or even halts the system. This option will slow
  1577.     down the scanning process so it should only be used when necessary.
  1578.     Note that option 'compat' does not affect the results of a scan.
  1579.  
  1580.    2.8.14.  ignofile (in)
  1581.  
  1582.     If this option is specified and no files can be found, TbScan will
  1583.     not display the 'no files found' message, nor does it exit with
  1584.     errorlevel 1. This option might be useful for automatic archive
  1585.     contents scanning. If the archive contains no executable files,
  1586.     TbScan will not return with an error condition.
  1587.  
  1588.    2.8.15.  noboot (nb)
  1589.  
  1590.     If you specify this option TbScan will not scan the bootsector.
  1591.  
  1592.    2.8.16.  sector (ss)
  1593.  
  1594.     This option is experimental. It enables the scanning operation of a
  1595.     disk at sector level. This way you can trace those viruses that
  1596.     reside outside files and bootsector and the hard-to-spot stealth
  1597.     viruses.
  1598.  
  1599.     This option might also tell you that a virus ever resided in your
  1600.     system in the past.  If so, this does not mean that the virus
  1601.     itself is still active. Even if TbScan itself deleted an infected
  1602.     file in the past, this option still enables TbScan to detect the
  1603.     signature for quite a while. Hence this option is NOT recommended
  1604.     for a regular scan.
  1605.  
  1606.     Note that TbScan cannot disassemble files in this mode. False
  1607.     alarms may occur frequently since everything is being searched, and
  1608.     the search even covers unused disk space containing garbage.
  1609.  
  1610.    2.8.17.  nomem (nm)
  1611.  
  1612.     If you specify this option TbScan will not scan the memory of the
  1613.     PC for viruses.
  1614.  
  1615.    2.8.18.  hma (hm)
  1616.  
  1617.     TbScan detects the presence of an XMS-driver, and scans HMA
  1618.  
  1619.  
  1620.  
  1621.                                     Page 24
  1622.  
  1623.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  1624.  
  1625.  
  1626.     automatically. If you have an HMA-driver that is not compatible
  1627.     with the XMS standard you can use the 'hma' option to force TbScan
  1628.     to scan HMA.
  1629.  
  1630.    2.8.19.  nohmem (nh)
  1631.  
  1632.     By default TbScan identifies RAM beyond the DOS limit and scans
  1633.     that too. This means that video memory and the current EMS pages
  1634.     are scanned by default. You can use the 'nohmem' option to disable
  1635.     the scanning of non-DOS memory.
  1636.  
  1637.    2.8.20.  nosub (ns)
  1638.  
  1639.     By default TbScan will search sub-directories for executable files,
  1640.     unless a filename (wildcards allowed!) has been specified. If you
  1641.     use this option, TbScan will not scan sub-directories.
  1642.  
  1643.    2.8.21.  noavr (na)
  1644.  
  1645.     If you specify this option TbScan will not look for its AVR-modules
  1646.     (Algorithmic Virus Recognition modules; .AVR files) at start-up and
  1647.     will not perform any algorithmic scans on files.
  1648.  
  1649.    2.8.22.  delete (de)
  1650.  
  1651.     If TbScan detects a virus in a file it prompts the user to delete,
  1652.     move or rename the infected file, or to continue without action.
  1653.     If you specify the 'delete' option, TbScan will not ask the user
  1654.     what to do but will delete the infected file automatically. Use
  1655.     this option if you have established that your system has been
  1656.     infected.  Make sure that you have a clean back-up, and that you
  1657.     really want to get rid of all infected files at once.
  1658.  
  1659.    2.8.23.  rename (rn)
  1660.  
  1661.     If TbScan detects a file virus it prompts the user to delete, move
  1662.     or rename the infected file, or to continue without action. If you
  1663.     specify the 'rename' option, TbScan will not ask the user what to do
  1664.     but will rename the infected file automatically. By default, the
  1665.     first character of the file extension will be replaced by the
  1666.     character 'V'.  An .EXE file will be renamed to .VXE, and a .COM
  1667.     file to .VOM. This prevents the infected programs from being
  1668.     executed, spreading the infection. At the same time they can be
  1669.     kept for later examination and repair.
  1670.  
  1671.     You may also add a parameter to this option specifying the target
  1672.     extension.  This parameter should always contain 3 characters;
  1673.     question marks are allowed. The default target extension is 'V??'.
  1674.  
  1675.    2.8.24.  move (mv)
  1676.  
  1677.     If TbScan detects a virus in a file it prompts the user to delete,
  1678.  
  1679.  
  1680.  
  1681.                                     Page 25
  1682.  
  1683.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  1684.  
  1685.  
  1686.     move or rename the infected file, or to continue without action. If
  1687.     you specify the 'move' option, TbScan will not ask the user what to
  1688.     do but will move the infected file to another directory
  1689.     automatically.
  1690.  
  1691.     The file will be moved to the TbScan directory or to the directory
  1692.     specified with option 'path'.
  1693.  
  1694.    2.8.25.  path (mp)
  1695.  
  1696.     This option can be used to specify the move-path. The move path is
  1697.     used to move an infected file if option -move is specified or when
  1698.     the user selects the M) in the virus alert window.
  1699.  
  1700.    2.8.26.  batch (ba)
  1701.  
  1702.     If TbScan detects a file virus it prompts the user to delete, move
  1703.     or rename the infected file, or to continue without action. If you
  1704.     specify the 'batch' option TbScan will always continue. This option
  1705.     is designed for use in a batch file that is executed without the
  1706.     user attending. We highly recommended you to use a log file in such
  1707.     situations, as a scanning operation does not make much sense
  1708.     without the return messages being read.
  1709.  
  1710.    2.8.27.  repeat (rp)
  1711.  
  1712.     This option is very useful if you want to check a large amount of
  1713.     diskettes. TbScan does not return to DOS after checking a disk, but
  1714.     it waits until you insert another disk in the drive. You don't have
  1715.     to press a key on the keyboard when ready. TbScan detects
  1716.     automatically when the drive is ready to be accessed. This way you
  1717.     can check a large amount of diskettes without having to touch your
  1718.     keyboard.
  1719.  
  1720.     Note that the motor of the disk drive keeps spinning, and the light
  1721.     keeps burning when a diskette has been processed. You can safely
  1722.     open and close the drive door to remove or insert a diskette while
  1723.     the motor still runs. Many back-up programs handle the drives the
  1724.     same way as TbScan does, without causing any harm.
  1725.  
  1726.    2.8.28.  log (lo)
  1727.  
  1728.     When you use this option, TbScan creates a LOG-file.  The default
  1729.     filename is TBSCAN.LOG and it will be created in the current
  1730.     directory.  You may optionally specify a path and filename. The
  1731.     LOG-file lists all infected program files, specifying upper-case
  1732.     heuristic flags and complete pathnames. If the log file already
  1733.     exists, it will not be overwritten. Instead the new LOG-file will
  1734.     be appended to the existing one.
  1735.  
  1736.     If you use this option often, it is recommended to delete or
  1737.     truncate the log file every month to avoid unlimited growth.
  1738.  
  1739.  
  1740.  
  1741.                                     Page 26
  1742.  
  1743.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  1744.  
  1745.  
  1746.     If you want to print the results, you can specify a printer device
  1747.     name rather than a filename (log=lpt1).
  1748.  
  1749.    2.8.29.  session (sl)
  1750.  
  1751.     This option is nearly identical to the 'log' option above. The
  1752.     difference is that if a log file already exists, the 'session'
  1753.     option will make sure that this will be overwritten by new log
  1754.     information.  Hence a log file created by the 'session' option will
  1755.     only contain information obtained from a single scanning session.
  1756.  
  1757.    2.8.30.  loglevel (ll)
  1758.  
  1759.     The 'loglevel' option determines which files will be put in the
  1760.     log file. There are five log levels:
  1761.         0       Log only infected files. If there are no infected files
  1762.                 do not create or change the log file.
  1763.         1       Put a summary and timestamp in the log file. Put only
  1764.                 infected files in the log file.
  1765.         2       Same as loglevel=2, but now also 'suspected' files are
  1766.                 logged. Suspected files are files that would trigger
  1767.                 the heuristic alarm if option 'heuristic' had been
  1768.                 specified.
  1769.         3       Same as loglevel=2, but all files that have a warning
  1770.                 character printed behind the filename will be logged
  1771.                 too.
  1772.         4       All files being processed will be put into the log
  1773.                 file.
  1774.  
  1775.     The default log level is 1.
  1776.  
  1777.     Note: you have to combine this option with option 'log' or
  1778.     'session'.
  1779.  
  1780.    2.8.31.  expertlog (el)
  1781.  
  1782.     If you specify this option TbScan will not display the descriptions
  1783.     of the heuristic flags into the log file.
  1784.  
  1785.    2.8.32.  sigfile (sf)
  1786.  
  1787.     You can override the default path and name of the signature file by
  1788.     using this option.
  1789.  
  1790.     TbScan normally tries to locate a signature file by itself. See
  1791.     chapter 3.10 for information on how TbScan searches such a data
  1792.     file. If TbScan does not succeed in recognizing or locating the
  1793.     default data file, or if you want to override TbScan's default data
  1794.     search path, you should use the 'sigfile' option.
  1795.  
  1796.     Note: if you specify option 'sigfile' without filename parameter,
  1797.     TbScan assumes that you want to scan heuristically only, and it
  1798.  
  1799.  
  1800.  
  1801.                                     Page 27
  1802.  
  1803.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  1804.  
  1805.  
  1806.     will scan without any signature or AVR information. Option
  1807.     'heuristic' is implied in this situation.
  1808.  
  1809.  
  1810.   2.9.  Examples:
  1811.  
  1812.         TbScan \ sigfile=c:\TbScan.Dat noboot
  1813.             Process all executable files in the root directory and its
  1814.             sub-directories.  Skip the bootsector scan.  Use the
  1815.             signature file 'c:\TbScan.Dat'.
  1816.  
  1817.         TbScan \*.*
  1818.             Process all files in the root directory. Don't process
  1819.             sub-directories.
  1820.  
  1821.         TbScan c:\ log=c:\test.log loglevel=2
  1822.             All executable files on drive C: will be checked. A
  1823.             LOG file with the name c:\test.log will be created. The log
  1824.             file will contain all infected and suspected files.
  1825.  
  1826.         TbScan \ sigfile log=lpt1
  1827.             TbScan will scan the root directory and its sub-directories
  1828.             without signature or AVR information. Option 'heuristic' is
  1829.             assumed in this case. The results are redirected to the
  1830.             printer rather than to a log file.
  1831.  
  1832.  
  1833.   2.10.  The configuration file
  1834.  
  1835.     Those people that are accustomed to the use of configuration files
  1836.     may devise a similar file for use with TbScan. The TbScan
  1837.     configuration file should be located in the same directory where
  1838.     the file TBSCAN.EXE resides, and it should be called TBS.BAT
  1839.     (surprise, surprise!). The format of this configuration file is as
  1840.     follows:
  1841.  
  1842.       tbscan %1 %2 %3 %4 %5 %6 %7 %8 %9 [<default options...>]
  1843.  
  1844.     Example:
  1845.  
  1846.       tbscan %1 %2 %3 %4 %5 %6 %7 %8 direct sigfile=c:\virus\Virscan.Dat
  1847.  
  1848.  
  1849.     To execute this configuration file you should type 'TBS C:\' at the
  1850.     DOS prompt. If you wish to override the default options specified
  1851.     in your TBS.BAT file, just type 'TBSCAN'.
  1852.  
  1853.     This configuration file can offer great possibilities. You may
  1854.     incorporate mnemonics like 'DAILY' and 'WEEKLY' to invoke a
  1855.     predefined scan session. The user may be allowed to specify
  1856.     additional options on the command line. You can make sure that if
  1857.     TbScan detects a virus, a file called VIRUS.TXT will be printed on
  1858.  
  1859.  
  1860.  
  1861.                                     Page 28
  1862.  
  1863.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  1864.  
  1865.  
  1866.     the screen, offering a user important information such as the
  1867.     emergency phone number of the company helpdesk and the phone number
  1868.     of your security officer.
  1869.  
  1870.     An example:
  1871.       @echo off
  1872.       if '%1'=='daily' goto daily
  1873.       if '%1'=='weekly' goto weekly
  1874.       :help
  1875.       echo Type 'TBS weekly' or 'TBS daily' to start a scan event
  1876.       goto end
  1877.       :daily
  1878.       tbscan c:\system d:\ %2 %3 %4
  1879.       if errorlevel 2 goto virus
  1880.       if errorlevel 1 goto help
  1881.       goto end
  1882.       :weekly
  1883.       tbscan c:\ d:\ e:\ log=c:\logs\tbscan.log %2 %3 %4
  1884.       if errorlevel 2 goto virus
  1885.       if errorlevel 1 goto help
  1886.       goto end
  1887.       :virus
  1888.       type virus.txt
  1889.       :end
  1890.  
  1891.     For more information about setting up this kind of powerful
  1892.     'configuration' file please consult the chapter on batch files in
  1893.     your DOS manual.
  1894.  
  1895.     Too few people are aware of the power of the DOS batch file
  1896.     features.  Why learn yet another configuration file language if
  1897.     a DOS batch file will suit your needs perfectly? You can predefine
  1898.     scan sessions, define default options, and branch to a specific
  1899.     routine if TbScan detects a virus.
  1900.  
  1901.     Your TbScan diskette is supplied with a sample BATCH file called
  1902.     TBS.BAT. You can edit it to suit your needs.
  1903.  
  1904.  
  1905.   2.11.  The TbScan.Msg file
  1906.  
  1907.     TbScan prints the TBSCAN.MSG file on your screen a few seconds after
  1908.     start-up. This file also appears when TbScan has finished scanning
  1909.     without detecting a virus. The file TBSCAN.MSG as supplied by us
  1910.     displays our address and registration info. However, you can edit
  1911.     this file as you please, for instance by adding your company logo.
  1912.  
  1913.     You may add color codes to the TbScan.MSG file. A color code is
  1914.     preceeded by the character '|'. The following color codes are
  1915.     available: (all numbers are in hex).
  1916.     Color               Foreground      Highlight       Background
  1917.     Black               00              08              00
  1918.  
  1919.  
  1920.  
  1921.                                     Page 29
  1922.  
  1923.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  1924.  
  1925.  
  1926.     Blue                01              09              10
  1927.     Green               02              0A              20
  1928.     Cyan                03              0B              30
  1929.     Red                 04              0C              40
  1930.     Magenta             05              0D              50
  1931.     Yellow/Brown        06              0E              60
  1932.     White/gray          07              0F              70
  1933.     Example:    To make a highligted green character on a red
  1934.     background the color code would be 0A+40=4A. To make the character
  1935.     blink add 80h to the result.
  1936.  
  1937.  
  1938.   2.12.  Residence of the signature files
  1939.  
  1940.     TbScan looks for the data file in the following order:
  1941.  
  1942.     1)  If the 'sigfile' option has been set, it will use the file
  1943.         specified in the search path.
  1944.     2)  It searches a file with the name VIRSCAN.DAT in the active
  1945.         directory.
  1946.     3)  It searches VIRSCAN.DAT in the same directory where the program
  1947.         file TBSCAN.EXE itself resides.
  1948.     4)  It searches a file with the name TBSCAN.DAT in the active
  1949.         directory.
  1950.     5)  It searches TBSCAN.DAT in the same directory where the program
  1951.         file TBSCAN.EXE itself resides.
  1952.  
  1953.     TbScan also looks for a data file containing last-minute update
  1954.     signatures. The file should be named ADDNSIGS.DAT and it should be
  1955.     located either in the current directory or in the TbScan home
  1956.     directory.
  1957.  
  1958.  
  1959.   2.13.  Residence of the AVR-modules
  1960.  
  1961.     The AVR-modules are only searched in the directory where the
  1962.     program TBSCAN.EXE itself resides.
  1963.  
  1964.  
  1965.   2.14.  Error messages
  1966.  
  1967.     Error messages that might be displayed:
  1968.  
  1969.     +   Error in data file at line <number>.
  1970.         There is an error in the specified line of the data file.
  1971.  
  1972.     +   Failed to locate DOS entry point.
  1973.         TbScan has not been able to locate the DOS entry point, but
  1974.         continues as if option 'direct' has not been specified.
  1975.  
  1976.     +   Limit exceeded.
  1977.         The total amount of internal signature information exceeded
  1978.  
  1979.  
  1980.  
  1981.                                     Page 30
  1982.  
  1983.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  1984.  
  1985.  
  1986.         64Kb. This message will be displayed if the number of
  1987.         signatures reaches 2500. You can either reduce the number of
  1988.         signatures or make them shorter.
  1989.  
  1990.     +   Command line error.
  1991.         An invalid or illegal command line option has been specified.
  1992.  
  1993.     +   No matching executable files found.
  1994.         The path specified does not exist, is empty, or the specified
  1995.         file does not exist or is not an executable file.
  1996.  
  1997.     +   Cannot create logfile.
  1998.         The specified log file path is illegal, the disk is full or
  1999.         write protected, or the file already exists and cannot be
  2000.         overwritten.
  2001.  
  2002.     +   Sanity check failed!
  2003.         TbScan detected that its internal checksum does not match
  2004.         anymore. TbScan is possibly contaminated by a virus.
  2005.         Obtain a clean copy of TbScan, put it on a WRITE PROTECTED
  2006.         bootable diskette, boot from that diskette, and try again!
  2007.  
  2008.  
  2009.   2.15.  Exit codes
  2010.  
  2011.     TbScan terminates with one of the following exit codes:
  2012.  
  2013.         Errorlevel 0:           no viruses found, no error occurred.
  2014.         Errorlevel 1:           some error occurred.
  2015.         Errorlevel 255:         sanity check failed.
  2016.         Errorlevel >1 and <128: one or more viruses detected.
  2017.  
  2018.     When a virus is detected the errorlevel is used as a bit field:
  2019.  
  2020.         bit 1 (02):             SYS file infected.
  2021.         bit 2 (04):             EXE file infected.
  2022.         bit 3 (08):             COM file infected.
  2023.         bit 4 (16):             virus found in LOW memory.
  2024.         bit 5 (32):             virus found in BOOTsector.
  2025.         bit 6 (64):             virus found in HIGH memory.
  2026.  
  2027.     An errorlevel of 26 means that a SYS, COM and LOW virus is found
  2028.     (26 = 02+08+16).
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.                                     Page 31
  2042.  
  2043.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  2044.  
  2045.  
  2046. 3.  FORMAT OF THE DATA FILE
  2047.  
  2048.  
  2049.   3.1.  Format of a signature entry
  2050.  
  2051.     The data file (called TBSCAN.DAT or VIRSCAN.DAT) can be read and/or
  2052.     modified using any DOS text editor.
  2053.  
  2054.     All lines starting with ';' are comment lines. TbScan ignores these
  2055.     lines. When the ';' character is followed by a percentage sign the
  2056.     remaining part of the line will be displayed on the screen.  A
  2057.     maximum of 8 lines can be printed on the screen.
  2058.  
  2059.     In the first line the name of a virus is expected. The second line
  2060.     contains one or more of the following terms:
  2061.  
  2062.             BOOT  SYS  EXE  COM  HIGH  LOW
  2063.  
  2064.     These terms may be separated by spaces, tabs or commas.
  2065.  
  2066.     BOOT means that the virus is a bootsector virus. the terms SYS, EXE
  2067.     and COM indicate that the virus must be scanned for in files with
  2068.     these extensions. Overlay files (with the extension OV?) will be
  2069.     scanned for EXE viruses. BIN files will be scanned for SYS viruses.
  2070.     HIGH means that the virus can occur in the memory of your PC at a
  2071.     location higher than the TbScan program itself. LOW means that the
  2072.     virus can occur in the memory of your PC at a location lower than
  2073.     the TbScan program itself.
  2074.  
  2075.     In the third line the signature is expected in ASCII-HEX.  Each
  2076.     virus character is described by means of two characters.
  2077.  
  2078.     An entry in the signature file should look like this:
  2079.  
  2080.         ;
  2081.         Test virus
  2082.         EXE COM
  2083.         ABCD21436587ABCD
  2084.         ;
  2085.  
  2086.     It is allowed to use spaces in the ASCII-HEX signature for your own
  2087.     convenience. TbScan will ignore those spaces.
  2088.  
  2089.     The three central lines should be present in each virus
  2090.     description.  Between these lines comment lines may be inserted.
  2091.  
  2092.  
  2093.   3.2.  Wildcards
  2094.  
  2095.     TbScan allows you to use wildcards in a signature. Wildcards can be
  2096.     used to define one signature that recognizes several related
  2097.     viruses.
  2098.  
  2099.  
  2100.  
  2101.                                     Page 32
  2102.  
  2103.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  2104.  
  2105.  
  2106.     -   The ? wildcard.
  2107.  
  2108.         The question mark specifies a wildcard nibble, which means that
  2109.         the corresponding half of the byte may have any value.
  2110.  
  2111.         Example:
  2112.  
  2113.                 A5E623CB??CD21?883FF3E
  2114.  
  2115.     -   The * wildcard.
  2116.  
  2117.         You can use the asterisk followed by an ASCII-HEX character to
  2118.         skip a fixed amount of bytes in the signature. The ASCII-HEX
  2119.         character specifies the amount of bytes that should be skipped.
  2120.  
  2121.         Example:
  2122.  
  2123.                 A5E623CB*3CD2155??83FF3E?BCD
  2124.  
  2125.         Hence the following sequence of bytes will be recognized as a
  2126.         virus:
  2127.  
  2128.             A5E623CB142434CD21554583FF3E3BCD
  2129.  
  2130.     -   The % wildcard.
  2131.  
  2132.         A percentage sign (%) followed by an ASCII-HEX character
  2133.         indicates that the remaining part of the signature could be
  2134.         located a number of bytes away.  The ASCII-HEX character
  2135.         specifies the maximum distance at which the remaining part
  2136.         should be found.
  2137.  
  2138.     -   The ** wildcard.
  2139.  
  2140.         You can use the '**'  wildcard to skip an unlimited variable
  2141.         amount of bytes in the signature.
  2142.  
  2143.  
  2144.   3.3.  Limitations.
  2145.  
  2146.     +   The name of a virus may contain up to 30 characters.
  2147.  
  2148.     +   The ASCII-HEX signature may contain up to 132 characters.
  2149.  
  2150.     +   A signature must contain at least one sequence of two
  2151.         non-wildcard bytes. A sequence of four however is recommended.
  2152.  
  2153.     +   The signature should start with a non-wildcard byte.
  2154.  
  2155.     +   The % wildcard should not be followed by any other wildcard.
  2156.  
  2157.     Examine the VIRSCAN.DAT file for examples of how signatures can be
  2158.  
  2159.  
  2160.  
  2161.                                     Page 33
  2162.  
  2163.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  2164.  
  2165.  
  2166.     made to fit the format of the signature file.
  2167.  
  2168.  
  2169.   3.4.  Defining new signatures.
  2170.  
  2171.     This chapter is intended for advanced users who own a TBAV.KEY
  2172.     file or a Thunderbyte add-on card.
  2173.  
  2174.     Although the VIRSCAN.DAT data file supplied with the TbScan package
  2175.     is updated frequently, new viruses are created each day, outpacing
  2176.     the regular upgrading service of this data file. It is therefore
  2177.     possible that one day your system gets infected by a recently
  2178.     created virus that has not yet been listed in the VIRSCAN.DAT file.
  2179.     TbScan will not always detect the virus in such cases, not even
  2180.     with the 'mutant' option set.  If you are convinced that your system
  2181.     must have been infected without TbScan confirming this, this
  2182.     chapter will supply you with a valuable tool to detect undocumented
  2183.     viruses with. We offer you step-by-step assistance here in creating
  2184.     an emergency signature that can be (temporarily) added to your copy
  2185.     of VIRSCAN.DAT.
  2186.  
  2187.  
  2188.     -   Collect some infected files and copy them into a temporary
  2189.         directory.
  2190.  
  2191.     -   Boot from a clean write-protected diskette. Do NOT execute ANY
  2192.         program from the infected system, even though you expect this
  2193.         program to be clean.
  2194.  
  2195.     -   Execute TbScan from your write-protected TbScan diskette with
  2196.         the 'extract' option set. Make sure that the temporary directory
  2197.         where you put the infected files will be TbScan's target
  2198.         directory. With its 'extract' option set, TbScan will NOT scan
  2199.         the files but, instead, display the first instructions that are
  2200.         found at the entry-point of the infected programs.  Please note
  2201.         that we highly recommend you to simultaneously set the
  2202.         'session' option of TbScan.
  2203.  
  2204.     -   Compare the 'signatures' extracted by TbScan. You should see
  2205.         something like this:
  2206.  
  2207.                 NOVIRUS1.COM    2E67BCDEAB129090909090ABCD123490CD
  2208.                 NOVIRUS2.COM    N/A
  2209.                 VIRUS1.COM      1234ABCD5678EFAB909090ABCD123478FF
  2210.                 VIRUS2.COM      1234ABCD5678EFAB901234ABCD123478FF
  2211.                 VIRUS3.COM      1234ABCD5678EFAB9A5678ABCD123478FF
  2212.  
  2213.         If the 'signatures' are completely different, the files are
  2214.         probably not infected, else they have been infected by a
  2215.         polymorphic virus that requires an AVR module to detect it.
  2216.  
  2217.     -   Replace all differences in the 'signatures' by question marks
  2218.  
  2219.  
  2220.  
  2221.                                     Page 34
  2222.  
  2223.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  2224.  
  2225.  
  2226.         ('?'). A signature to detect the 'virus' in the example above
  2227.         could be:
  2228.  
  2229.                 1234ABCD5678EFAB9?????ABCD123478FF
  2230.  
  2231.     -   Add the signature to the data file of TbScan. Give the virus a
  2232.         name in the first line of its entry. Specify the EXE and COM
  2233.         keywords in the second line. Enter the signature on the third
  2234.         (see 4.1.).
  2235.  
  2236.     -   Run TbScan again in the directory containing the infected
  2237.         files. TbScan should now detect the virus.
  2238.  
  2239.     -   Send a couple of infected files to a recommended virus expert,
  2240.         preferably to us.
  2241.  
  2242.     Congratulations! You have defined a signature all by yourself! Now
  2243.     you can scan all your machines in search of the new virus.
  2244.     However, keep in mind that this method of extracting a  signature
  2245.     is a 'quick-and-dirty' solution to viral problems. The extracted
  2246.     signature will not detect the presence of the virus in all cases. A
  2247.     signature that is guaranteed to detect all instances of the virus
  2248.     can be made only after complete disassembly of the new virus.  For
  2249.     these reasons you should NOT distribute your home-made 'signature'
  2250.     to others.  The signature eventually assembled by experienced
  2251.     anti-virus researchers will be completely different in most cases!
  2252.  
  2253.  
  2254.  
  2255.  
  2256.  
  2257.  
  2258.  
  2259.  
  2260.  
  2261.  
  2262.  
  2263.  
  2264.  
  2265.  
  2266.  
  2267.  
  2268.  
  2269.  
  2270.  
  2271.  
  2272.  
  2273.  
  2274.  
  2275.  
  2276.  
  2277.  
  2278.  
  2279.  
  2280.  
  2281.                                     Page 35
  2282.  
  2283.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  2284.  
  2285.  
  2286. 4.  CONSIDERATIONS AND RECOMMENDATIONS
  2287.  
  2288.  
  2289.   4.1.  What should be scanned?
  2290.  
  2291.     In the early days of viruses, virus scanners just scanned
  2292.     everything. Today we know that this approach has serious
  2293.     disadvantages: the number of false alarms is very high, the scan
  2294.     speed is very, very slow, etc.
  2295.  
  2296.     Before we proceed, let's first establish some facts about viruses.
  2297.     A virus is just a program. Like any other program, it will have no
  2298.     effect as long as it is not executed. Consequently, data files like
  2299.     text files can never spread a virus. Of course, it is always
  2300.     possible to copy a virus into a .TXT file, but since the text file
  2301.     itself will never be executed, the virus can never be activated
  2302.     from that location.  A virus signature in a .TXT file is treated as
  2303.     just any other stream of bytes to be found there. A program and a
  2304.     bootsector, however, will be executed, and if they contain a
  2305.     virus, the virus will gain control and do its nasty job.
  2306.  
  2307.     We now know that it doesn't make sense to scan non-executable
  2308.     files. What we therefore need to scan are files with the extensions
  2309.     EXE COM OV? SYS and BIN. Note that a batch file (.BAT) is just a
  2310.     text file.  Though it can be 'executed' in some way, it is not
  2311.     possible to program a virus in the batch file language.
  2312.  
  2313.     What do executable programs consist of? Naturally they contain
  2314.     program code, but they also contain data. The texts that will be
  2315.     displayed on the screen by that program are just data. They will
  2316.     never be 'executed'. We don't have to scan them.
  2317.     The exe-header of an exe file does not contain any code either,
  2318.     only data. The exe-header is there to assist DOS in loading the
  2319.     program, and it is thrown away before DOS passes control to the
  2320.     program itself. We don't have to scan it.
  2321.     The same applies to the bytes following the load-module of the
  2322.     file. This area of a file will not be loaded into memory at
  2323.     start-up. We don't have to scan it.
  2324.  
  2325.     Unfortunately, the code part of the executable file is mostly the
  2326.     larger one. The code-data ratio differs for each program, but on an
  2327.     average we can state that about two thirds of a program consist of
  2328.     code. However, it is hardly possible to separate the two. Even the
  2329.     operating system is not able to do this, only the program itself.
  2330.     What actually happens is that when you execute a program, the
  2331.     operating system passes control to the program at a fixed location
  2332.     in the program file. This location, referred to as ENTRY-POINT in
  2333.     this manual, is the first byte in case of a .COM file, or a
  2334.     location specified in the exe-header of an .EXE file. This location
  2335.     is the only location in a file of which we can be 100% sure it
  2336.     contains code. As to other locations we can only guess.
  2337.  
  2338.  
  2339.  
  2340.  
  2341.                                     Page 36
  2342.  
  2343.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  2344.  
  2345.  
  2346.     How does a virus work?
  2347.  
  2348.     A virus that is about to infect a file cannot just throw its viral
  2349.     code at a random location in that file, it won't work. The virus
  2350.     has to be sure that its code will be executed before the host
  2351.     program gains control. Why?  Because if the contaminated program
  2352.     finds itself altered, it will behave in an unexpected manner. If
  2353.     the program accesses internal resources that have been overwritten
  2354.     by the virus, the program will crash. Besides, how should the virus
  2355.     know whether that random location will ever be executed?
  2356.  
  2357.     There is only ONE location that will always be executed, and that
  2358.     is the entry-point of the program. To infect a file the virus has
  2359.     to attach itself to the entry-point and store the original
  2360.     instructions of the program at another location. Only there and
  2361.     then can the virus be certain it will gain control instead of the
  2362.     host program, and that it can restore the original instructions
  2363.     before it passes on control. All reports of virus infections of
  2364.     program files indicate that a virus ALWAYS attaches itself to the
  2365.     entry-point of a program.
  2366.  
  2367.     This leads us to a basic principle: if we scan the location where
  2368.     we can find the first instructions of the program, we can be
  2369.     certain we are scanning the area where the virus would reside.
  2370.     TbScan uses this knowledge when scanning a window of about 4Kb (as
  2371.     it does by default) around the program-entry point. This is called
  2372.     'Checking' or 'Looking'. If you wish to know more about this
  2373.     procedure consult chapter 6.2.: 'The Internals of TbScan'.
  2374.  
  2375.     Note that we do not take any risks when limiting the area where we
  2376.     scan for viruses. If their signatures are assembled according to
  2377.     the basic principles set out above, viruses cannot escape from
  2378.     detection, simply because they have to be in the 'window' where we
  2379.     scan for them.  To prove our point many other competitive virus
  2380.     scanners have adopted our scanning strategy.
  2381.  
  2382.     Also note that if TbScan is not completely sure about the exact
  2383.     location of the entry-point of the file, it scans ALL the program
  2384.     code of the file using the 'browse' or 'scan' algorithms.
  2385.  
  2386.  
  2387.   4.2.  The internals of TbScan
  2388.  
  2389.     4.2.1.  How is that blazing speed achieved?
  2390.  
  2391.         The speed of TbScan is achieved by many measures.
  2392.  
  2393.         To avoid false alarms, TbScan scans restricted areas of the
  2394.         file.  Naturally this approach benefits the scanning speed.
  2395.         Disk access is minimized, and not much data has to be
  2396.         searched.
  2397.  
  2398.  
  2399.  
  2400.  
  2401.                                     Page 37
  2402.  
  2403.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  2404.  
  2405.  
  2406.         TbScan is entirely written in assembly language. High-level
  2407.         languages like Pascal and Basic have an enormous overhead which
  2408.         not only affects the size of the program but also reduces the
  2409.         execution speed.
  2410.  
  2411.         The search routine has been highly optimized. Every byte to be
  2412.         scanned is only accessed once, regardless of the number of
  2413.         signatures. Execution time will hardly increase when it has to
  2414.         scan for 3000 signatures instead of 500. The search algorithm
  2415.         used can be described as 'rotating semi-double 16-bits
  2416.         hashing'.
  2417.  
  2418.         The number of DOS function calls has been minimized. DOS is
  2419.         relatively slow, and access should be avoided as much as
  2420.         possible.  For this reason TbScan walks through a directory
  2421.         just once instead of first processing the files and the
  2422.         sub-directories afterwards or vice versa.
  2423.  
  2424.         TbScan writes directly to the screen instead of calling on DOS
  2425.         or BIOS to do this. Although TbScan has a scrolling window,
  2426.         screen access is minimized as much as possible without
  2427.         affecting the visual display of the program output.
  2428.  
  2429.         TbScan has a built-in disk cache. Although a disk cache has
  2430.         already been installed in many systems, a standard disk cache
  2431.         slows down the scanning speed of a virus scanner instead of
  2432.         increasing it! This slow-down is caused by the disk cache,
  2433.         trying to make assumptions as to what the program will be
  2434.         reading next.  The standard disk cache will fail here because
  2435.         it doesn't know that files will be accessed only once. Neither
  2436.         is it aware of the fact that after a file has been partially
  2437.         scanned, the remaining part will not be accessed by TbScan at
  2438.         all. The cache wastes many clock cycles reading ahead and
  2439.         maintaining megabytes of data which the scanner is not
  2440.         interested in. On the other hand, the directories and the FAT
  2441.         are accessed a lot, and a standard disk cache could increase
  2442.         TbScan's performance a lot here, if it would just restrict
  2443.         itself to those areas. Our solution is to temporarily install
  2444.         one that 'knows' which data are required and which are not.
  2445.         Depending on the hardware specifications of a machine, the
  2446.         scanning speed will be increased by 10%.
  2447.  
  2448.     4.2.2.  The code interpreter
  2449.  
  2450.         Viruses can only infect program files according to a fixed
  2451.         strategy. There is only one single point in a program file that
  2452.         a virus can be certain will be executed, namely the starting
  2453.         point of the program. It cannot be sure of any other location
  2454.         which explains why it will not attempt to put its first code
  2455.         just anywhere in the program file that it is planning to
  2456.         infect. The virus will always have to put AT LEAST one
  2457.         instruction at the entry-point of the program.
  2458.  
  2459.  
  2460.  
  2461.                                     Page 38
  2462.  
  2463.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  2464.  
  2465.  
  2466.         TbScan uses this knowledge to restrict the number of bytes that
  2467.         have to be read in a file as much as possible. Just like the
  2468.         loader of DOS itself, it determines where the entry point of
  2469.         the program is located: right at the beginning of a COM-file or
  2470.         at the address specified in the exe-header of an EXE-file.
  2471.  
  2472.         However, this is not where TbScan will stop. As jump or other
  2473.         branch instructions are being found at the entry-point of a
  2474.         program file, TbScan will follow this jump - or chain of jumps
  2475.         - until it does not come across a jump anymore. By then we have
  2476.         located the real starting-point of the program or, in case it
  2477.         has been infected, the virus itself.
  2478.  
  2479.         There is the possibility, however, that after TbScan has
  2480.         followed through a chain of jumps it then finds that there are
  2481.         new significant IP-modifying instructions (calls, rets, irets,
  2482.         jumps) not far from the real starting-point that it has just
  2483.         established.  Could this future jump point to a virus code, or
  2484.         have we really reached the starting-location?  TbScan does not
  2485.         take any chances and will read the entire file scanning for
  2486.         viruses.  Only when it is 100% sure to have found the real
  2487.         starting-point of a file - at least 20 bytes of continuous
  2488.         (hence 'stable') code - TbScan will limit its check to the 4 Kb
  2489.         surrounding this spot.
  2490.  
  2491.         Note that very few viruses require more than 4 Kb. In those
  2492.         cases TbScan will scan for the first 4 Kb of their signatures
  2493.         inside its scanning window.
  2494.  
  2495.     4.2.3.  The algorithms
  2496.  
  2497.         When TbScan processes a file it prints 'Looking', 'Checking',
  2498.         'Tracing', 'Browsing', 'Scanning' or 'Skipping'.
  2499.  
  2500.       4.2.3.1.  Looking
  2501.  
  2502.         'Looking' means that TbScan has successfully located the entry
  2503.         point of the program, and that the code has been identified as
  2504.         something known. 'Looking' is the fastest and most reliable
  2505.         scan algorithm, but it can only be applied on programs produced
  2506.         by known software, such as known compilers, file compressors,
  2507.         etc. 'Looking' is almost the same as 'Checking' but the
  2508.         predefined information is used to increase the speed of
  2509.         scanning.
  2510.  
  2511.         Looking will be used on files that are produced by known
  2512.         software.
  2513.  
  2514.       4.2.3.2.  Checking
  2515.  
  2516.         'Checking' means that TbScan has successfully located the entry
  2517.         point of the program, and is scanning a frame of about 4Kb
  2518.  
  2519.  
  2520.  
  2521.                                     Page 39
  2522.  
  2523.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  2524.  
  2525.  
  2526.         around the entry point. If the file is infected the signature
  2527.         of the virus will be in this area. 'Checking' is a very fast
  2528.         and reliable scan algorithm.
  2529.  
  2530.         Checking will be used on most files that are not produced by
  2531.         known software.
  2532.  
  2533.       4.2.3.3.  Tracing
  2534.  
  2535.         'Tracing' means that TbScan has successfully traced a chain of
  2536.         jumps or calls while locating the entry-point of the program,
  2537.         and is scanning a frame of about 4Kb around this location. If
  2538.         the file has been infected, the signature of the virus will be
  2539.         in this area. 'Tracing' is a fast and reliable scan algorithm.
  2540.  
  2541.         Tracing will be primarily used for TSR-type COM files or Turbo
  2542.         Pascal-compiled programs. Most viruses will force TbScan to use
  2543.         'Tracing'.
  2544.  
  2545.       4.2.3.4.  Scanning
  2546.  
  2547.         'Scanning' means that TbScan is scanning the entire file
  2548.         (except for the exe-header which cannot contain any viral
  2549.         code). This algorithm will be used if 'Looking', 'Checking' or
  2550.         'Tracing' cannot be safely used. This is the case when the
  2551.         entry-point of the program contains other jumps and calls to
  2552.         code located outside the scanning frame. 'Scanning' is a slow
  2553.         algorithm.  Because it processes almost the entire file,
  2554.         including data areas, false alarms are more likely to occur.
  2555.  
  2556.         The 'Scanning' algorithm will be used while scanning
  2557.         bootsectors, SYS and BIN files.
  2558.  
  2559.       4.2.3.5.  Browsing
  2560.  
  2561.         'Browsing' is nearly identical to the 'Scanning' algorithm,
  2562.         but it performs a little better on files containing long
  2563.         sequences of low ASCII, 00 or FF bytes. On other files (like
  2564.         compressed files) it performs worse. Hence TbScan decides which
  2565.         is the most efficient algorithm when scanning a file.
  2566.         'Browsing' is as reliable as 'Scanning' but it also shares the
  2567.         tendency to cause false alarms. In fact, any dumb scan
  2568.         algorithm (i.e.  algorithm without intelligence) will suffer
  2569.         from this kind of unreliability.
  2570.  
  2571.         Like the 'Scanning' algorithm, 'Browse' will be used while
  2572.         scanning memory, bootsectors, SYS and BIN files.
  2573.  
  2574.       4.2.3.6.  Skipping
  2575.  
  2576.         'Skipping' will occur with SYS and OVL files only. It simply
  2577.         means that the file will not be scanned. As there are many SYS
  2578.  
  2579.  
  2580.  
  2581.                                     Page 40
  2582.  
  2583.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  2584.  
  2585.  
  2586.         files that contain no code at all (like CONFIG.SYS) it makes
  2587.         absolutely no sense to scan these files for viruses.
  2588.  
  2589.         The same applies to .OV? files. Many overlay files do not
  2590.         deserve to be called as such as they lack an exe-header. Such
  2591.         files cannot be invoked through DOS making them just as
  2592.         invulnerable to direct virus attacks as .TXT files are. If a
  2593.         virus is reported to have infected an .OV? file, it involved
  2594.         one of the relatively few overlay files that does contain an
  2595.         exe-header. The infection was then the result of the virus
  2596.         monitoring the DOS exec-call (function 4Bh) and infecting any
  2597.         program being invoked that way, including 'real' overlay files.
  2598.  
  2599.     4.2.4.  Option 'compat'
  2600.  
  2601.         The 'compat' option is used to increase compatibility with your
  2602.         system if the default behavior of TbScan causes problems. The
  2603.         differences between the default and compatibility modes are:
  2604.  
  2605.         -       In default mode, TbScan installs a disk cache if
  2606.                 enough memory is available. In the compatibility mode
  2607.                 TbScan will not install the TbScan disk cache.
  2608.  
  2609.         -       While scanning memory, TbScan temporarily disables the
  2610.                 interrupts for each 32 Kb-block being scanned. In
  2611.                 compatibility mode, however, TbScan performs a
  2612.                 non-destructive scan and does not disable interrupts at
  2613.                 all. It offers the highest compatibility but memory
  2614.                 scanning may slow down considerably in some instances.
  2615.  
  2616.         -       If the 'compat' switch has been specified TbScan does
  2617.                 not use AVR-modules to scan memory. Memory-related
  2618.                 AVR-modules contain virus-specific function requests
  2619.                 that could interfere with resident software. The
  2620.                 compatibility mode does make use of AVR-modules,
  2621.                 however, when scanning files.
  2622.  
  2623.   4.3.  The Sanity check
  2624.  
  2625.     TbScan performs a sanity check when it fires up. However, to be
  2626.     honest, it is NOT possible to make software 100% virus-resistant.
  2627.     If this was the case, the virus problem could be solved simply by
  2628.     incorporating a self-check in every program.
  2629.  
  2630.     Unfortunately, a sanity check does not work if a 'stealth' type of
  2631.     virus is involved. A stealth virus can hide itself completely when
  2632.     a self-check is being performed. Do note that we are not dealing
  2633.     with a TbScan bug here. The failure to detect stealth viruses is
  2634.     common to ALL software performing a sanity check. Therefore, we
  2635.     recommend you to keep a clean version of TbScan on a
  2636.     write-protected diskette. Use this diskette to check other machines
  2637.     once you have found a virus in your own system.
  2638.  
  2639.  
  2640.  
  2641.                                     Page 41
  2642.  
  2643.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  2644.  
  2645.  
  2646.  
  2647.   4.4.  How many viruses does it detect?
  2648.  
  2649.     Some people think that TbScan recognizes only 500 viruses, based
  2650.     upon the fact that the signature file contains only 500 signatures.
  2651.     What they do not realize is that the signatures are family
  2652.     signatures, which means that each signature covers many viruses.
  2653.     For instance, our PLO/Jerusalem signature detects over 25 viruses
  2654.     which are all related to the 'original' Jerusalem virus! Only one
  2655.     (wildcarded) signature is needed by TbScan to cover all these
  2656.     mutants.
  2657.  
  2658.     Some competitive products treat each virus mutant as a separate
  2659.     virus, and so claim to detect over 1200 viruses. However, TbScan
  2660.     detects even more viruses using 'only' 500 signatures.
  2661.  
  2662.  
  2663.   4.5.  Testing the scanner
  2664.  
  2665.     Many people understandably wish to test the product they are using.
  2666.     While it is very easy to test, for instance, a word processor, it
  2667.     is very difficult to test a smart scanner like TbScan. You cannot
  2668.     extract 25 bytes from an executable and insert it in the TBSCAN.DAT
  2669.     or VIRSCAN.DAT data file as a bogus signature just to find out
  2670.     whether or not TbScan will detect the 'signature' in the file it
  2671.     was copied from.  It is very likely that TbScan does NOT find it
  2672.     because it only scans the entry-area of the file whereas the
  2673.     'signature' you extracted might be taken from some other location
  2674.     within the file.
  2675.  
  2676.     You might ask: 'How then can I test the scanner if using a 'test
  2677.     signature' does not work?' We think you can't, unless you are an
  2678.     experienced assembler programmer.  Sorry, but testing a
  2679.     disassembling scanner should be performed by virus experts only.
  2680.     Fortunately, you don't have to rely on our tests solely.  There are
  2681.     anti-virus magazines that regularly publish tests of all virus
  2682.     scanners.  At the end of this manual you will find names and
  2683.     addresses of such magazines.  Anyway, third parties have tested our
  2684.     scanner along with several others, and they found TbScan to have a
  2685.     very high hit rate. It detects even more viruses than many popular
  2686.     scanners do.
  2687.  
  2688.  
  2689.   4.6.  Scan scheduling
  2690.  
  2691.     It is highly advisable to devise your own schedule for a regular
  2692.     scan of your system. Creation of a special TbScan boot diskette is
  2693.     highly recommended in this respect.
  2694.  
  2695.     Boot from your original DOS diskette. Use the diskcopy command to
  2696.     copy the DOS diskette onto a new diskette. Delete all files from
  2697.     this diskette, except for the two hidden system files and
  2698.  
  2699.  
  2700.  
  2701.                                     Page 42
  2702.  
  2703.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  2704.  
  2705.  
  2706.     COMMAND.COM.  Copy all TbScan files to the diskette. Create a new
  2707.     AUTOEXEC.BAT file which should contain the line 'TbScan C:\'.
  2708.     Write-protect the diskette with the write-protect tab.
  2709.  
  2710.     The following scan sessions (listed in order of preference) are
  2711.     recommended:
  2712.  
  2713.     -   Run TbScan from A WRITE-PROTECTED BOOTABLE DISKETTE once a
  2714.         week. Boot from this diskette before invoking the scanner. We
  2715.         agree that it may be inconvenient to boot from a diskette, but
  2716.         it is the only way to make sure that no stealth virus will
  2717.         become resident in memory.
  2718.  
  2719.     -   It is recommended to invoke a daily scan. You can invoke
  2720.         TbScan with the 'once' option from within the autoexec.bat file
  2721.         to perform the daily scan session automatically.  It is not
  2722.         necessary to boot from the bootable TbScan diskette to perform
  2723.         the daily scan.
  2724.  
  2725.     The 'sector' and the 'mutant' option should never be used in a
  2726.     normal scan session but only when you expect the system to be
  2727.     infected by a virus.
  2728.  
  2729.  
  2730.   4.7.  Extensions to the format of the data file
  2731.  
  2732.     There are a number of other scanners which are compatible with the
  2733.     data file format used by TbScan. Some of these scanners allow for
  2734.     certain extensions to the data file which we consider absurd and
  2735.     therefore refuse to implement. These extensions include special
  2736.     signatures for upper memory, overlay files, and numerous (highly)
  2737.     confusing filename extensions, different keywords for the same
  2738.     items, and XOR-decryption directives.  TbScan scans upper memory
  2739.     for LOW-type viruses (since any LOW-type TSR can be loaded in upper
  2740.     memory through DOS 5.0), and overlay files for EXE-type viruses
  2741.     (since overlays are just a special kind of EXE file). TbScan's XOR
  2742.     decryptions are performed much more efficiently through its own AVR
  2743.     modules.
  2744.  
  2745.  
  2746.   4.8.  Compressed files
  2747.  
  2748.     Many executable files are compressed or packed. They contain an
  2749.     unpacking routine which unpacks the executable in memory to restore
  2750.     the original program size. The simplest compressor is the Microsoft
  2751.     ExePack program. This compressor is even included in the link
  2752.     program itself (use the /E option while linking to pack the
  2753.     executable).
  2754.  
  2755.     If the program contained a virus BEFORE compression took place, the
  2756.     virus has been compressed too. A scanner will not recognize the
  2757.     virus because of its compressed signature. The virus will still be
  2758.  
  2759.  
  2760.  
  2761.                                     Page 43
  2762.  
  2763.  Thunderbyte virus detector. (C) Copyright 1989-1992 Thunderbyte B.V.
  2764.  
  2765.  
  2766.     able to execute though.
  2767.  
  2768.     If a virus resides inside a compressed file, it betrays its
  2769.     presence by infecting other files in your system. Hence the
  2770.     signature will be visible in all the newly infected files, which
  2771.     the scanner will dutifully report. The compressed file that brought
  2772.     the (compressed) virus into your system will probably not trigger
  2773.     an alarm itself. The virus inside this program can do its worst all
  2774.     over again unless you isolate this compressed file as the source of
  2775.     the infection.
  2776.  
  2777.     TbScan displays a 'p' behind each file that it finds to be
  2778.     compressed by ExePack or any other compressor. TbScan does not
  2779.     unpack files, since too many files are compressed nowadays.
  2780.     Decompressing each one of them in your system would only be
  2781.     feasible if there was a limited number of compression schemes. Even
  2782.     if there were, TbScan unpacking all your compressed files would be
  2783.     consuming too much time, the more so as most of the time this
  2784.     action would be quite unnecessary. Once you have established that a
  2785.     compressed file does not contain a virus, you can rest assured that
  2786.     this file will not get internally infected at a later date. Hence
  2787.     it makes no sense to have TbScan unpack these files time and time
  2788.     again. If there wasn't a virus the first time you checked, there
  2789.     will not be one at subsequent times.
  2790.  
  2791.     Note that if the compressed file gets infected AFTER it has been
  2792.     compressed, the virus has NOT been compressed and will be clearly
  2793.     visible to a scanner. The problem we referred to above only exists
  2794.     when a file has been infected first and compressed afterwards.
  2795.  
  2796.     Fortunately, you can treat compression as a minor risk when files
  2797.     have been compressed by the programmer of the product (as is often
  2798.     the case). Most programmers are aware of the existence of viruses
  2799.     and go about compression with great care. If the programmer did not
  2800.     compress the file, well, then the file has not been compressed and
  2801.     the problem does not exist at all,...that is, if you obtained the
  2802.     original version of a program of course.
  2803.  
  2804.     If you obtained your copy of the program from another copy, you
  2805.     have joined ranks with those that use illegal (!) copies of
  2806.     software and thereby take great risks! One of the previous owners
  2807.     of the program may have compressed it, treating you (perhaps
  2808.     unknowingly) to a nasty virus infection.
  2809.  
  2810.  
  2811.  
  2812.  
  2813.  
  2814.  
  2815.  
  2816.  
  2817.  
  2818.  
  2819.  
  2820.  
  2821.                                     Page 44